Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to start my ASP.Net Web service whenever IIS starts and want to keep it running. I don’t want to manually start my Web service. How can I achieve this?
Not about Windows service please.
Any ideas please.

Thanks
Sreenath
Posted
Updated 18-May-11 23:23pm
v2
Comments
Abhinav S 19-May-11 5:24am    
Removed pre-tags from question.

1 solution

Honestly, you should never need to start IIS.

Have a system that you call the server, install IIS on that machine and host your webservice in this instance of IIS. You will never need to restart IIS or the Web service. There may be times when you need to restart the server for Windows updates etc, but IIS and the web service should be restarting automatically.
 
Share this answer
 
Comments
Abhinav S 19-May-11 5:23am    
Moved comment from OP.
"Hi, I mean I have some continue check which is written in a function...but if I just host the service..even then I ll have to manually call that function right..?"
Abhinav S 19-May-11 5:30am    
Yes. That function will still need to be called.
You could put in a timer in the service code. This can execute and call the function whenever required. But this approach could cause lots of bugs and issues with synchronization etc.

Hoping some else has a better idea.
Sergey Alexandrovich Kryukov 19-May-11 14:10pm    
That is correct, my 5.
To add for accuracy: you only need to re-start the HTTP server when you change the parameters of the server itself; never need it if you change anything in any Web application.
--SA
Abhinav S 19-May-11 23:36pm    
Thank you SA.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900