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.
e.g. 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?
IIS Manager for Remote Administration is an administration tool that provides end users and administrators with the ability to remotely manage IIS servers of version 7.0 and above. Details. Note: There are multiple files available for this download.
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.
FIREWALL RULE FOR WEB MANAGEMENT SERVICE The default port for web management is 8172.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With