'/ domain / website'应用程序中的服务器错误

时间:2009-11-27 10:04:07

标签: asp.net iis web webserver web-deployment-project

我在部署网站时遇到以下错误..

Server Error in '/domain/website' Application.

Runtime Error 
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

我尝试更改customErrors mode =“Off”但是没有Joy ..same错误重复...

此外,缺少GenericErrorPage.htm会导致错误吗?

任何帮助?

2 个答案:

答案 0 :(得分:1)

这可能是因为web.config中存在语法错误。您可以尝试将当前的web.config替换为仅包含此内容的web.config,并查看会发生什么:

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

答案 1 :(得分:0)

您是否在自己的网站中使用了双重web.config。例如。

如果您在/ domain中使用一个web.config,在/ domain / website中使用另一个。您需要将/ website转换为应用程序。

但是,我建议您登录服务器并浏览页面,您将能够看到真正的问题。如果您不确定如何解决它。发布一次。我们或许可以帮到你。