最常见的ASP.NET错误提示解决

作者:网络 来源:佚名 更新时间:2008-03-04 00:43:44 点击:

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 应用程序根目录下的“web.config”配置文件中创建一个 <customerrors> 标记。然后应将此 <customerrors> 标记的“mode”属性设置为“remoteonly”。若要使他人能够在远程计算机上查看详细信息,请将“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.
注释: 通过修改应用程序的 <customerrors> 配置标记的“defaultredirect”属性,使之指向自定义错误页的 url,可以用自定义错误页替换所看到的当前错误页。

<!-- web.config configuration file -->

<configuration>
    <system.web>
        <customerrors mode="remoteonly" defaultredirect="mycustompage.htm"/>
    </system.web>
</configuration>

最大的网站源码资源下载站,