Click here to Skip to main content
15,884,948 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
www.ebsindiaonline.com
is my website.
everything is working fine but i have been facing one problem.
that is,if i open one page and did not do anything for a while,after sometime when i do some activities in that page it is showing the following error....


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


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

XML
<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
Posted

1 solution

In order to see the proper error you need to do what that is instructing and update your web.config.

Secondly, the solution to your problem is not to make a page that never times out as that is impossible, it would use up all your server's resources. The solution is to fix your code such that it doesn't error when the session times out. When you turn off custom errors you'll see the real problem, but I suspect you are doing things like

C#
string user = Session["User"].ToString();


or something similar, ie assuming your session variables are always populated. What you need to do is update your code to check if the session variables exist or not, and if not do something that makes your site degrade gracefully. What that is depends on what your site is doing, you might want to make them re-login, or go back to the beginning of a certain process to gather the data again.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900