简体   繁体   中英

Remote IIS Management

I've got an ASP.Net application which manages the IIS server as follows:

Successfully using Microsoft.Web.Administration.ServerManager to manage the local IIS 7 server no problem (I'm creating new sites, virtual folders etc on the fly).

What I really need to do is manage a remote server to do the same.

eg Web Application lives on IIS01, user clicks on "Create Virtual Folder" button, and this then connects to IIS02 to create the required folder.

I'm assuming that Microsoft.Web.Administration.ServerManager is NOT the correct way to go forward as this appears to manage the local instance only, so what is- if it's possible?

You can use the static ServerManager.OpenRemote() method to get/mange a remote system:

var manager = ServerManager.OpenRemote("IIS02"); //Or, by IP "1.1.1.1"

This returns a ServerManager instance for that machine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM