0
我想以编程方式添加站点绑定。这里是我的代码:以编程方式添加站点绑定IIS 7.5
using (ServerManager manager = ServerManager.OpenRemote("serverName"))
{
manager.Sites["siteName"].Bindings.Add(string.Format("*:{1}:{0}.localhost", clientCode, port), "http");
manager.CommitChanges();
}
我收到以下错误。我如何解决这个问题?
UnAuthorizedException: Retrieving the COM class factory for remote component with CLSID {} from machine failed due to the following error: 80070005