Server Error in '/' Application. 出现是什么原因,网站调试

来源:百度知道 编辑:UC知道 时间:2024/06/03 20:57:51
我在网站调试过程中,出现以下情况,请问是什么原因啊??

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 8: </buildProviders>
Line 9: </compilation>
Line 10: <authentication mode="Windows" />
Line 11: <customErrors mode="Off" defaultRedirect="~/error.htm">
Line 12: <error statusCode="404"

1.看看IIS的配置有没有问题,在VS2008不用IIS是否能正常运行
2.如果IIS配置没有问题,且在VS2008里可以正常运行,那么重新作asp.net for iis
3.如果IIS配置有问题,且在VS200里可以正常运行,那么请重新配置IIS
4.如果IIS配置没有问题,且在VS2008里不能正常运行,那么请检查您程序

你用了 .html的页面是吗?

在web.config的<system.web>和</system.web>之间加上下面的代码

<buildProviders>
<add extension=".html" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>