I have a web service that I use to kick off a long-running job that dumps a
lot of data to an XML file (takes about 5 minutes). I need to have ASP.NET
produce the XML file as the web site has the code I need (and extracting it
into a stand-alone EXE would be a LOT of work). The webservice client is a
vb.net app with a vs-generated webservice.
Currently, the webservice seems to timeout after about 120 seconds.
I have been struggling with this for 2 days now... any help would be much
appreciated.
I have set the processModel in the machine.config:
<processModel responseDeadlockInterval="00:30:00"
responseRestartDeadlockInterval="01:00:00" autoConfig="true"/>
and executionTimeout & debug="false" in web.config:
<httpRuntime executionTimeout="9000" maxRequestLength="1048576" />
<compilation debug="false" defaultLanguage="vb">
IIS Web Configuration:
keep-alives enabled, connection timeout 120 seconds
and my client has an infinite timeout:
Dim t As New MyWebService
t.Timeout = System.Threading.Timeout.Infinite
EventLog1.WriteEntry("start webservice request: " & CStr(DateTime.Now))
Try
EventLog1.WriteEntry("webservice returned: " & CStr(DateTime.Now) &
t.writexml)
Catch ex as exception
EventLog1.WriteEntry(ex.message)
End Try
I get the following error from ASP.NET on the server logs after about 120
seconds:
Event code: 3001
Event message: The request has been aborted.
Event time: 2006/11/27 08:58:28 AM
Exception type: HttpException
Exception message: Request timed out.
And a general exception on the client:
Exception: request failed with an empty response.
If I restart the Application Pool and the Web site, and immediately call the
WebService it occasionally runs fine - but then only once, sometimes.
Anyone have any further ideas what I can do to fix this? Or a better way to
invoke long-running jobs in ASP.NET.
Thanks
Chris