B
belgiozen
Hi,
I have a working windows service,it is looking for files on the disk
and when some of the files are cupdated it calls an executable. But it
takes a lot of time(about 10 minutes) to run the executable.So while
that executable is running,if I try to stop the windows service while
the executable(MYPROGRAM.EXE) is running,it will wait for a time(about
20 seconds) for the main windows thread to abort.If it does not finish
its work, the service process is killed AUTOMATICALLY and tells
something like "the service did not stop ina timely fashion".
As the windows service will never be able to finish its work under a
minute,
my service always is stooped by WINDOWS and got the message "the
service did not stop ina timely fashion".
I need a asynchronous way to execute the MYPROGRAM.EXE in a different
process than the windows service process so that even if the service
stops,if MYPROGRAM.EXE will continue to run..
One way to do is to call a web service method asynchronously which
executes MYPROGRAM.EXE ...So the .NET code for the windows service
will not suspend when it calls the windows service method. and will
stop ina timely fashion when it is signaled. But I think there should
be better ways of implementing it without using IIS.
I'll appreciate very much if you help...
I have a working windows service,it is looking for files on the disk
and when some of the files are cupdated it calls an executable. But it
takes a lot of time(about 10 minutes) to run the executable.So while
that executable is running,if I try to stop the windows service while
the executable(MYPROGRAM.EXE) is running,it will wait for a time(about
20 seconds) for the main windows thread to abort.If it does not finish
its work, the service process is killed AUTOMATICALLY and tells
something like "the service did not stop ina timely fashion".
As the windows service will never be able to finish its work under a
minute,
my service always is stooped by WINDOWS and got the message "the
service did not stop ina timely fashion".
I need a asynchronous way to execute the MYPROGRAM.EXE in a different
process than the windows service process so that even if the service
stops,if MYPROGRAM.EXE will continue to run..
One way to do is to call a web service method asynchronously which
executes MYPROGRAM.EXE ...So the .NET code for the windows service
will not suspend when it calls the windows service method. and will
stop ina timely fashion when it is signaled. But I think there should
be better ways of implementing it without using IIS.
I'll appreciate very much if you help...