日期:2014-05-20  浏览次数:20415 次

急!网站上传到虚拟空间后出现“Configuration Error”提示
网站是用VS2005开发的。在本机的IIS和开发工具里都能正常浏览。但在虚拟空间里就出现
HTML code
Server Error in '/' Application.
--------------------------------------------

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error: 


Line 27:             以标识传入的用户。 
Line 28:         -->
Line 29:         <authentication mode="Windows"/>
Line 30:         <!--
Line 31:             如果在执行请求的过程中出现未处理的错误,
 

Source File: d:\freehost\shhfftp\web\ck\web.config    Line: 29 


--------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 

我要如何做,,才能在网上正常浏览?



------解决方案--------------------
虚拟路径设置好了没?,估计是放到虚拟空间路径问题
------解决方案--------------------
是不是你的站点没有被配置成应用程序?

问一下你的空间商。
------解决方案--------------------
应该上配置问题~
------解决方案--------------------
给你弄了张截图,但CSDN太垃圾不能上传图片,传到百度空间了,但百度的图片在其他网站不能显示。给你地址自己去看吧:

http://hi.baidu.com/liuyj/blog/item/bcd952827d875ea70df4d247.html
------解决方案--------------------
这个问题只能找空间商,这是虚拟目录的问题
------解决方案--------------------
如果是你租的虚拟空间,不可能为你提供Windows模式的验证吧?
------解决方案--------------------
你的应用程序未被创建为虚拟目录
------解决方案--------------------
你能不能多贴一点出来
------解决方案--------------------
有很多情况会造成这种错误

检查
1.IIS 站点属性中 ASP.NET的版本
2.是否创建了应用程序,在主目录里
3.IIS 相关服务是否已经启动
4.IIS是否禁用了ASP.NET
5.是否允许了匿名用户

------解决方案--------------------
探讨
你的应用程序未被创建为虚拟目录

------解决方案--------------------
期待答案,正好遇到这个问题啊,谢谢楼主了
------解决方案--------------------
复制我的标签system.web去试试吧。。
XML code


<system.web>
        <httpHandlers>
       
        </httpHandlers>
    <pages validateRequest="false"></pages>
        <!-- 
            设置 compilation debug="true" 将调试符号插入
            已编译的页面中。但由于这会 
            影响性能,因此只在开发过程中将此值 
            设置为 true。
        -->
        <compilation debug="true"/>
        <!--
            通过 <authentication> 节可以配置 ASP.NET 使用的 
            安全身份验证模式,
            以标识传入的用户。 
        -->
    <!--    <authentication mode="Windows"/>
        
            如果在执行请求的过程中出现未处理的错误,
            则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
            开发人员通过该节可以配置
            要显示的 html 错误页
            以代替错误堆栈跟踪。-->

        <!--<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>-->
    <customErrors mode="Off"></customErrors>
    <!--<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>-->
    <!--
        <sessionState timeout="10" />
        -->
    <authentication mode="Forms"/>
  </system.web>