[2005] web services and lenghty operation
helllloooo all,
i have a web service that implements a very long operations of database maintenance. so it takes about 3 - 10 minutes in average.
the problem is , i call this maintenance service from my windows application (vb.net 205) . it works fine but it raises a timeout exception after a while.
the exception raised told me about something called pump message that the web serivce should raise periodically to the client using the service method in order to advise him that the service is still procssing and prevent the time out.
something like application.doevents
i have searched for nearly 20 minutes without luck, so if can anybody save me the time and advise me what to write inside the blocks of the webservice. i will be thankful
RGDS all and thx for your time
Re: [2005] web services and lenghty operation
anybody up for the Quest ?
(-:
Re: [2005] web services and lenghty operation
You should ask this in the ASP.NET forum, probably.
Re: [2005] web services and lenghty operation
is the timeout happening client side or server side?
On the client end of things, you can set your WS object's timeout to infinite..
MyWebService.Timeout = System.Threading.Timeout.Infinite
Where MyWebService is your WS variable...
System.Threading.Timeout.Infinite is a constant that equals -1
Re: [2005] web services and lenghty operation
thank you all of your replies.
the timeout happens at client side because the web service takes a long time before responding
if any moderator thinks this is an asp.net topic then plz move it.
thank you
Re: [2005] web services and lenghty operation
did you try setting the timeout to infinite to see if that makes the client wait without thinking it timed out?
I would not consider this specifically an ASP.NET issue, more of a VB.NET issue, so for now I will leave the post where it is.
Re: [2005] web services and lenghty operation
Are you using the Async versions of the methods? That may help as well.
Re: [2005] web services and lenghty operation
sorry Edneeis, i am somehow igrnorant so i dont know what are you talking about.
i know the concepts of multithreading in .net but dont know what do u mean by that post :blush:
Re: [2005] web services and lenghty operation
Web Service methods will have a Begin and End version of the original method as well. These are what you use to launch the same method asynchronously (in another thread so to speak).