运行时错误 [英] Runtime error

查看:154
本文介绍了运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误的含义是什么,我该怎么做才能解决此问题?:

what is the meaning of error,and what do I do for solve this problem ? :

描述:服务器上发生了应用程序错误.该应用程序的当前自定义错误设置可防止出于安全原因而远程查看该应用程序错误的详细信息.但是,可以由运行在本地服务器计算机上的浏览器查看它.

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.

详细信息:要使此特定错误消息的详细信息在远程计算机上可见,请在当前Web应用程序根目录中的"web.config"配置文件中创建一个标记.然后,该标签的模式"属性应设置为关".

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

推荐答案

错误提示:编辑web.config并将错误模式更改为关".

It tells you in the error: edit web.config and change the error mode to Off.

例如,添加以下内容:

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

出于安全原因,您不想在外部给出详细的错误,因此通常这是一个更好的设置:

For security reasons you don't want to give out detailed errors externally, so this is usually a better setting:

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="~/Error.aspx"/>
    </system.web>
</configuration>

如果从服务器访问,这将在您的开发计算机或服务器上显示错误,但会将外部用户重定向到自定义错误页面.

This will display errors on your development machine or on the server if visited from the server, but redirect external users to a custom error page.

这篇关于运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆