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!!!!
LVL 16
Easwaran ParamasivamAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
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.
0
Easwaran ParamasivamAuthor Commented:
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?
0
David Johnson, CD, MVPOwnerCommented:
I would be debugging the web service and not the client
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Easwaran ParamasivamAuthor Commented:
Well. The web service has one method calling a method from a Utility DLL. Please suggest.
0
Easwaran ParamasivamAuthor Commented:
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.
0
David Johnson, CD, MVPOwnerCommented:
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.
then you need to set a timer in the web service and then start the process in another thread.. if the timer reaches 120 seconds then kill the thread and return failure to the client.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Easwaran ParamasivamAuthor Commented:
Could you please provide some sample code to accomplish that?
0
Easwaran ParamasivamAuthor Commented:
@David Johnson, MVP: Could you please provide sample code explaining your approach?
0
Easwaran ParamasivamAuthor Commented:
Thanks. For the sample code I look for I would raise another question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.