刷新页面时,“/”应用程序错误中的服务器错误 [英] Server Error In '/' Application Error When I Refresh The Page

查看:105
本文介绍了刷新页面时,“/”应用程序错误中的服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个应用程序,该应用程序发布在iis.when我运行应用程序它工作正常10分钟后我刷新页面我收到此错误





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

运行时错误

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

详细信息:要在远程计算机上查看此特定错误消息的详细信息,请创建< customErrors > 标记位于当前Web应用程序根目录中的web.config配置文件中。此< customErrors > 标记应该然后将其mode属性设置为Off。


<! - Web.Config配置文件 - >

< 配置 >
< system.web >
< customErrors mode = / >
< / system。网站 >
< / configuration >

注意:您看到的当前错误页面可以替换为自定义错误页面通过修改应用程序的< customErrors > 配置标记指向自定义错误页面URL。


<! - Web.Config配置文件 - >

< 配置 >
< system.web >
< customErrors mode = RemoteOnly defaultRedirect = mycustompage.htm < span class =code-keyword> / >
< / system.web >
< / configuration >





请与我分享任何想法。

解决方案

请更改自定义错误模式关闭,如Web配置中所示,或者从控制面板检查事件查看器是否有错误。


查看事件日志以查看是否有任何异常写入。如果没有显示任何内容,则应暂时按照错误屏幕中的说明操作,并按照屏幕中的详细说明打开web.config文件中的customErrors。请注意,您应该只在实际获得错误所需的最短时间内执行此操作。只要您有错误的副本,请删除此部分 - 它应该仅作为最后的手段使用,并且在最短的时间内,否则您将公开有关应用程序内部工作的详细信息,这是安全性差的做法

i devloped one application that application published in iis.when i run the application it's working fine after 10 minutes i refresh the page i am getting this error


Server Error in '/' Application.

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.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>



please share any idea to me.

解决方案

please change the custom error mode to off as shown in the web config or check the event viewer from the control panel for error.


Review the event log to see if there are any exceptions being written to it. If that shows you nothing, you should temporarily follow the instructions in the error screen and switch on the customErrors in the web.config file as detailed in the screen. Note, you should only do this for the minimum amount of time it takes you to actually get the error up. As soon as you have a copy of the error, remove this section - it should only be used as a last resort, and for the minimum amount of time possible otherwise you are exposing details about the inner workings of your application which is poor security practice.


这篇关于刷新页面时,“/”应用程序错误中的服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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