开发者

changing ASP.NET page timeout

I have an ASP.NET web application calling an ASP.NET web service which then itself calls into a report in reporting services for the report to be saved to a file. The whole thing is supposed to wait until the report is there and then return back up the chain with a downloadable pdf report.

The problem is that the report takes longer than 90 seconds to generate and the page in the web application times out whilst waiting for it to return from the call to generate the report. The report is eventually produced but I'd like the page to keep waiting for it.

I've tried setting something in IIS7 under 'ASP' 'Limits-Properties' called 'Script Time-out', which was on 1:30, to 5:00 but it makes no difference. I've done this for both my web application and the web service but do not think (maybe incorrectly) it needs doing in reporting services, where I cannot find the setting anyway, since the report is always produced so that itself is not erroring.

I've also tri开发者_运维问答ed changing <httpRuntime maxRequestLength="32768" executionTimeout="60000"/> to set 20000 milliseconds to see if it timed-out any quicker and it again had no effect, which was not surprising since it it was going to then the time-outs should have been in 60 seconds before I changed it, not 90.

So how do I change it to wait longer for the report?


I might be wrong, but I fear the timeout is set on the client browser. Can you approach this from another perspective? ie. return a "loading" page that refreshes every 5 seconds untill the report is ready?


You should take a look into http://msdn.microsoft.com/en-us/library/e1f13641.aspx to change your web.config and increase your executionTimeout configuration.

This will NOT solve your long running problem and maybe it creates another problem.

You could try to create a async engine to process that reports. When user ask for a report, put it into a MSMQ queue and background process it; when you done, send an email with that report attached.

This way your user don't need to wait inside your application and can turn his/her mind to another subject.


Your call to the webservice will have a timeout. Make sure you set that to an appropriate value, but it would be best to have a loading page that refreshes once the data is available.


The timeout could also be limited by the firewall or proxy in front of the web site.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜