Link to home
Start Free TrialLog in
Avatar of Easwaran Paramasivam
Easwaran ParamasivamFlag for India

asked on

Webservice method runs even after Client gets timeout exception

I've a utility DLL. I created a webservice method which calls a method from the Utility DLL. The webservice is deployed. A client application (windows form application) is created to consume the webservice method. If the webservice method takes more time, the timeout exception is received in the windows form application whereas the actual method (from Utility DLL) is getting completed. All what I want is that, if the windows form method gets timeout exception then the webservice method (from Utility DLL) should NOT complete its execution. How to achieve this? Kindly help on this. Thanks!!!!
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

you have a client that asks a service to do something the service starts processing  and the client times out so now you want the client to send a command to have the service stop processing?

IMHO the correct thing is to debug the service and find out where it is hanging. that or increase your timeout.
Avatar of Easwaran Paramasivam

ASKER

Thanks. In client side (where the webservice is consumed) I increased the timeout as 2 minutes. But that did not solve the issue. Is there anyway to specify the same timeout in the Web service method itself?  If so, will that solve my issue?
I would be debugging the web service and not the client
Well. The web service has one method calling a method from a Utility DLL. Please suggest.
The web service method contain body as given below:


 

ResponseType rs;
rs = UtilObj.ProcessMessage(RequestXML);

Open in new window


There is no problem of the web service method takes long time. If it takes more than 2 minutes I need to STOP the method executing further.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Could you please provide some sample code to accomplish that?
@David Johnson, MVP: Could you please provide sample code explaining your approach?
Thanks. For the sample code I look for I would raise another question.