views:

153

answers:

3

Hello together

I want to Start/Stop the Default Web Site and any Application Pool of the IIS7 programmatically in C# Knows anyone how to do this, is there any library??

Thank you very much

+1  A: 

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#.

ho1
A: 

You can use using System.DirectoryServices

http://terrapinstation.wordpress.com/2008/06/12/restart-iis-application-pool-from-aspnet-page/

Vishwa Kumar
A: 

Thank you very much :)

poppyniwa