【发布时间】:2011-04-14 14:03:31
【问题描述】:
这可能是一个奇怪的问题,但我被困住了。我将我的网页托管到我公司的网络托管服务中。当我放置已发布的文件时,它向我抛出了这个错误:
“/”应用程序中的服务器错误。
运行时错误 说明:服务器上发生应用程序错误。此应用程序的当前自定义错误设置阻止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以被本地服务器机器上运行的浏览器查看。
详细信息:要在远程计算机上查看此特定错误消息的详细信息,请在位于当前 Web 应用程序根目录的“web.config”配置文件中创建一个标签。然后,此标记应将其“模式”属性设置为“关闭”。
<!-- 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>
这就是我的 Web.config 的样子:
<system.web>
<customErrors mode="RemoteOnly">
</customErrors>
【问题讨论】:
-
请给出您的 web.config 的完整定义
标签: c# asp.net web-hosting