asp.net

位置:IT落伍者 >> asp.net >> 浏览文章

ASP.NET最常见错误提示


发布日期:2024年05月02日
 
ASP.NET最常见错误提示

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 nfig 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 应用程序根目录下的nfig配置文件中创建一个 <customErrors> 标记然后应将此 <customErrors> 标记的mode属性设置为RemoteOnly若要使他人能够在远程计算机上查看详细信息请将mode设置为Off

<! WebConfig Configuration File >

<configuration>

<systemweb>

<customErrors mode=Off/>

</systemweb>

</configuration>

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

注释: 通过修改应用程序的 <customErrors> 配置标记的defaultRedirect属性使之指向自定义错误页的 URL可以用自定义错误页替换所看到的当前错误页

<! WebConfig Configuration File >

<configuration>

<systemweb>

<customErrors mode=RemoteOnly defaultRedirect=/>

</systemweb>

</configuration>

上一篇:ASP.net MVC自定义错误处理页面

下一篇:asp.net导入excel转为datatable