How do I stop the Webservice execution after certain amount of time?

  • Thread starter Thread starter Jack Wright
  • Start date Start date
J

Jack Wright

Dear All,
I have observed that if I call a synchronous WebService from my
aspx page then even if I set oProxy.TimeOut = 1000, the WebService
thread execution is still running...
Since my WebService might run a big query that a client has written,
it eventually recycles my workerprocess...
How to I abort the WebService execution
I tried to set httpRuntime executionTimeout in my Web.Config and
Machine.config...
<httpRuntime executionTimeout="10" appRequestQueueLimit="2" />

but it did not work...
Could someone throw some light as to how to stop the execution of a
WebService thread after certain amount of time...

Thanks & Regards
Sunil
 
Set the executionTimeout in the Web service's web.config file to some
suitable value. Make sure you have also <compilation debug="false"/> in the
same web.config as executionTimeout is ignored if compilation is in debug
mode. This should make your web service time out when you want it to. Note
that the timeout is not exact - its likely to take a little longer than what
you specify.

Another thing you'll want to ensure is that in the web application (i.e.,
the consumer), the executionTimeout is more than the web service proxy
timeout. If your web page times out before the proxy times out, it can cause
the socket used by the proxy to be leaked. The defaults are pretty bad in
this respect: the proxy timeout is 100 seconds and the web page timeout is
90 seconds.

Sami
www.capehill.net
 
Back
Top