Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Start/Stop Default Web Site and Application Pools in IIS7 programmatically

Tags:

c#

iis-7

default

How to Start/Stop the Default Web Site and any Application Pool of the IIS7 programmatically in C#?

like image 866
mercedakias Avatar asked Jun 11 '10 13:06

mercedakias


1 Answers

This sounds like something that you'd want to use WMI for. THe IIsWebServer class would probably be a good place to start looking, you can find documentation for that here. And here's a codeproject article for stopping and starting sites in C#.

like image 189
Hans Olsson Avatar answered Nov 14 '22 23:11

Hans Olsson