Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2004

Tip: Looking for answers? Try searching our database.

Can a WebService execute a LONG process?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Garrek - 26 Apr 2004 07:38 GMT
I'm sorry if this has been posted twice.  I checked and don't see the
original in the newsgroup.

I need to expose a WebService that can take some two to six hours to
execute.  A SmartClient will connect to the WS (WebService) and start
execution asyncronously.  It's possible the client may disconnect and
check the progress later.

We are concerned the WebService will cancel the process as it can take
so long to execute.  In addition, what about the client 'disconnecting'
- is this an issue?   If so, how do I address this problem?

Thanks
Paul Glavich [MVP - ASP.NET] - 26 Apr 2004 09:31 GMT
Sounds like an excellent candidate for an Asynchronous web service. On the
generated proxy for the web service, you can call the 'BeginInvoke' method
which will immediately return from the call. Part of the call is the passing
of a return method that is called when the web service is complete. If at
some later point, you want to wait, you can call the 'EndInvoke' to
sybchronously wait for the end of the service. A couple of hours is a huge
time to wait though and it would be best to handle this asynchronously
rather than doing any waiting on the end of the call.

Here is a couple of links

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/h
tml/service09032002.asp
http://www.codeproject.com/cs/webservices/webservicecallback.asp

--
- Paul Glavich
Microsoft MVP - ASP.NET

> I'm sorry if this has been posted twice.  I checked and don't see the
> original in the newsgroup.
[quoted text clipped - 9 lines]
>
> Thanks
Garrek - 30 Apr 2004 05:28 GMT
Paul, thank you for the prompt reply.

We currently are executing the WS call asynchronously.  However, I'm
concerned that ASP.Net will cancel the process as it 'thinks' the
process froze due to it taking so long to execute.

Is this a concern?  How would I deal with it?

Thanks

> Sounds like an excellent candidate for an Asynchronous web service. On the
> generated proxy for the web service, you can call the 'BeginInvoke' method
[quoted text clipped - 10 lines]
> tml/service09032002.asp
> http://www.codeproject.com/cs/webservices/webservicecallback.asp
Paul Glavich [MVP - ASP.NET] - 02 May 2004 13:46 GMT
To be honest, I am not 100% sure, although as long as the framework can
"ping" the request and see its still alive, it should not kill it. Mind you,
check the <processModel> settings in your machine.config to see if you will
need to tweak some of the settings in there.

It might be worth sending this kind of request to a message queue, where a
service can simply pick off the message and execute what is required. The
service can simply execute a web service that calls whatever is required to
notify that the process is complete.

--
- Paul Glavich
Microsoft MVP - ASP.NET

> Paul, thank you for the prompt reply.
>
[quoted text clipped - 16 lines]
> >
> > Here is a couple of links

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/h
> > tml/service09032002.asp
> > http://www.codeproject.com/cs/webservices/webservicecallback.asp

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.