How to automatically start a C# WebService?

Posted by hancock on Stack Overflow See other posts from Stack Overflow or by hancock
Published on 2010-03-24T08:06:38Z Indexed on 2010/03/24 8:13 UTC
Read the original article Hit count: 232

Filed under:
|
|
|

Hi,

I have written a C# WebService. The problem is that after I publish it to IIS it won't automatically start unless any of its methods is called. This is very frustrating because this WebService has to continuously do some background work immediately after it starts (its constructor executes). If IIS is restarted, the WebService will just sit idly until one of its methods is called. Is there a way to overcome this and force the WebService to execute its constructor immediately after it is published or IIS restarted?

© Stack Overflow or respective owner

Related posts about c#

Related posts about webservice