views:

162

answers:

3

Hi everbody,

I am having an issue in webservice which resides in mono. I am having a webservice which process huge database operation. I have given "Timeout = 1024" in the "webconfig" file under "appSettings" tag.

When call is done to the webservice after 2 minuter i am getting "thread abort exception".

please help me to overcome this problem

regards Kumaran

+1  A: 

It is bad practice to place long operations (in your case it is over 2 mins) to synchronous web service method. Usually web service is only facade to start long time method on back-end server or at least another thread. Client can periodcally check if operation is done (so called watchdog pattern). Or review possibility to use oneway method - when client doesn't care about result at all.

By the way, NOTE, even succeed operation in web request must finish with ThreadAbort exception - since HttpRequest contains it raising at end of request processing

Dewfy
+1  A: 

You want to set the request timeout also. This is something like 30 or 60 seconds by default.

In the system.web section, set something like:

<httpRuntime executionTimeout="200"/>

This will affect all the pages, so perhaps you want to put the page in a separate folder so that you can have a local web.config file for this setting.

Guffa
A: 

Check the innerexception. That's supposed to have some sort of HttpApplication.CancelModelException that should contain a flag indicating if it's a timeout or not. Either way, if you do have an innerexception it may provide more insight.

Additionally, make sure your method is set to async.

cottsak