views:

332

answers:

3

Hi All,

I wanted a help in executing a static method asynchronously as well as in it's own process so that even if the client application that kicked-off this execution is closed, the method will continue it's execution.

One option to do this is create a console application and execute this console application as a new process. However, I was thinking if anyone has a different solution to this problem.

Thanks in advance.

Regards, Vilas

+1  A: 

If I understand your problem right, it is better to go for Windows Service and Remoting in .Net. You can initiate the call to the method from any Remoting client once the service is started.

srikanthv
A: 

I agree with srikanthv about a Windows Service, but I'd personally use the MSMQ to communicate with it.

Noon Silk
A: 

If the static method needs to be on the same machine as the client and you can't install services on the machine, you could always set a flag on the client to indicate that the method is running, and if the client is closed while the flag is set, abort the close and just hide the form until the method completes, then close gracefully.