Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have developed an application in asp.net. Recently I am facing a serious problem. Runtime error occurs whenever a page is postback after a long time. That means if any page is opened in the browser for a long time without any postback, if causes runtime error whenever a postback occurs. The pages works nice after refreshing or reloading them. Why these behave like this if they kept opened for a long time? What is the solution of that? Someone please help me.
Posted
Comments
I guess this is not the error due to the page opened for a long time in browser.
I suspect the session is expiring after certain time and the session existence condition is not handled by your project or code.

But still I am not sure. You have to debug your code. Just run it and as you have mentioned after a long time do a postback and check where there is problem in your code.

Thanks...
Tadit.
Abdullah Al-Muzahid 22-Nov-12 15:14pm    
No, there is no problem with my codes. I handled exception in every block of code. The pages do not have this problem when I run them in localhost. This problem occurs when it is hosted in the server. I think there needed to add something in the web.config....
deepakaitr12345 22-Nov-12 8:10am    
Hi

Please check the connection close and dispose.
Might be there are few places which are not properly closed.

When you come to application after a long time check the error log if it is invalid call back then check the postback or the values are persisting in session or not.

Hope this will help you

Thanks
Abdullah Al-Muzahid 22-Nov-12 15:18pm    
Connections are handled properly. If there was any problem regarding connection, it would through an exception which is handled properly and this would be written in the error log. I checked the error log but there is nothing....

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