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