tags:

views:

27

answers:

2

Here is my question

I have a WCF service that I implemented using a singleton pattern, therefore only one instance of it will effectively ever run at any given time.

Now I have an aspx page that has a button called 'build' When I press 'build', the WCF services runs a method that takes about 15 minutes. The problem is when I make the call to the WCF service, I would like it to just start the method and not wait for it to complete, so that the user can navigate away, close the browser, etc and the method will run until it is complete.

Is this doable with a WCF service or did I go down the wrong avenue?

+1  A: 

You can create a thread in your service.

marcc
Right, but will the thread stay alive even if i close the browser or navigate away?
Matt
It should, yes. It sounds like you are hosting the service in IIS? Once you start the thread, the webmethod (service method) will continue and return but it won't kill the thread.http://forums.asp.net/p/1414648/3121821.aspx#3121821Look at the bottom post from John Saunders, a few gotchas there.
marcc
A: 

How about the client using the Begin/End asychronous versions of the service method?

Steven Sudit