开发者

Remote IIS Management

开发者 https://www.devze.com 2023-01-10 02:16 出处:网络
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 开发者_JAVA技巧no problem (I\'

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 开发者_JAVA技巧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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号