views:

284

answers:

4

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 tried 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?

+1  A: 

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.

Rubens Farias
A: 

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?

Radu094
I cannot find the setting in either Firefox 3.5 or IE8 but setting execution timeout on the server certainly doesn't seem to do the trick (whether debug is false OR true - it says it must be false on http://msdn.microsoft.com/en-us/library/e1f13641.aspx but still no effect). So we're going to do a holding page with a background check for when it's ready as suggested.
Phil
A: 

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.

ck
A: 

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

Jan Aagaard