Faqs on asp.net,c#,vb.net and sqlserver2005

this blog covers all the Faqs related to .net technologies like asp.net,vb.net,c#.net,ajax,javascript and sqlserver2005.

Mar 11, 2008

How to do time taking operations in asp.net?

How to avoid request timeout?
have a web page with a single button that causes postback.
The button_OnClick method takes some time to finish, something like 30 minutes.
After 5-10 minutes the page goes to "The Page Cannot Be Displayed" screen.
I changed the timeout values in IIS, but it didn't make any change.


Try setting the httpRuntime node in your web.config. You can set things like maximum upload size, or execution timeout. "executionTimeout" is in seconds.
configuration
system.web
!-- MAX UPLOAD FILE SIZE: 100MB HTTP TIMEOUT: 30MIN--
httpRuntime maxRequestLength="102400" executionTimeout="1800"/
/system.web
/configuration
I used this for an app that needed to stay running for half an hour (it created like 2300+ zip files).
use open and close angular brackets in the code

Happy Programming

0 Comments:

Post a Comment

<< Home