Web运行时错误.配置文件



这可能是一个奇怪的问题,但我卡住了。我托管我的网页到我的公司的网络托管服务。当我把已发布的文件放进去时,它会给我这个错误:

'/'应用程序服务器错误。

运行时错误说明:服务器上出现应用程序错误。此应用程序的当前自定义错误设置防止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以被运行在本地服务器机器上的浏览器查看。

Details:要使此特定错误消息的详细信息在远程机器上可见,请在"web"中创建一个标签。配置文件位于当前web应用程序的根目录。然后,该标签的"mode"属性应该设置为"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>

这是我的网页。配置如下:

    <system.web>
    <customErrors mode="RemoteOnly">
    </customErrors>

将模式更改为Off,然后查看实际错误。

如果错误仍然很模糊,那么它可能是web上的错误。

最新更新