On Fri, Feb 6, 2009 at 11:16 AM, graphicsxp <[email protected]> wrote: > > Hello, > > I've got a client application (in Flex 3) which calls a very heavy > function in a .net Webservice., Because the operation can take a while > to complete, I'd like the webservice to update a progressbar in the > client application. > > Obviously it's not that easy, since it's an asynchronous call and the > client application only listens for the completion of the request. How > can I achieve that ? Do I need to use a different technologies (WCF > maybe ?) > > Thanks
I take it you are talking about a web-app? HTTP is a stateless protocol. So the web browser or a plug in doesn't know what is happening after the HTTP request and the HTTP response is finished. You can tackle this many ways. It depends on your architecture. You can have your web service update a DB table with an ID and the status or progress, etc. Then have your client side code call a status service with an ID to get the progress. Or, you can just have a status like bar that just shows working with some back and forth graphic while waiting for the original service call to complete. Some more details on your setup might help with suggestions. How long does the service take? More than a minute? If so, maybe consider a delayed response like system where the client side code just says "thanks champ, your request/process has been sent..." and send an email when the process is completed?
