How can I start IIS in program

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

Hi,
How can I detect if the IIS started or not?
If the IIS is stop, How can I start it start IIS with C#?
 
Hello, ad!

a> Hi,
a> How can I detect if the IIS started or not?
a> If the IIS is stop, How can I start it start IIS with C#?

To detect IIS status you can:
- search for inetinfo.exe process
- get status of IIS Admin Service windows service
- call issreset /status cmd

To do the restrart you can execute iisreset command.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Please check your other post for an answer.
Note that you should stay away from inetinfo.exe, this is the admin service
for IIS, if you stop this service all services like W3SVC (and all the web
applications), FTP, NNTP, SMTP will stop (provided they are configured and
running).
Note also that on W2K3 (IIS6) and up, the web service (and FTP, SMTP ...)
are hosted in a shared service (svchost.exe), they are o longer hosted by
inetinfo.exe.

Willy.


| Thanks,
| But how to search for inetinfo.exe process?
|
|
| "Vadym Stetsyak" <[email protected]>
| ???????:%[email protected]...
| > Hello, Vadym!
| >
| > VS> To detect IIS status you can:
| > VS> - search for inetinfo.exe process
| > VS> - get status of IIS Admin Service windows service
| > VS> - call issreset /status cmd
| >
| > VS> To do the restrart you can execute iisreset command.
| >
| > Forgot to mention that WMI can also be used for this
| > ( http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=114 )
| >
| > --
| > Regards, Vadym Stetsyak
| > www: http://vadmyst.blogspot.com
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top