Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage IIS from C#?

Tags:

c#

.net

iis-7

I would like to write a service that does some IIS management tasks for me, like creating virtual directories or adding new applications.

Is it possible to do some management of IIS by a C# application or WCF service.

like image 319
Kees C. Bakker Avatar asked Aug 17 '12 12:08

Kees C. Bakker


People also ask

How do I open IIS Manager from CMD?

To start IIS Manager from the Run dialog boxOn the Start menu, click All Programs, click Accessories, and then click Run. In the Open box, type inetmgr and then click OK.

How do I remotely connect to IIS?

To enable remote connections and allow connections from Windows users and IIS Manager users: In IIS Manager, in the Connections pane, click the server node in the tree. Double-click Management Service to open the Management Service feature page. Select the Enable remote connections check-box.


1 Answers

It looks like you can use the Microsoft.Web.Administration api to do most tasks with IIS 7+. Would that meet your requirements?

like image 52
Davin Tryon Avatar answered Oct 25 '22 02:10

Davin Tryon