开发者

ServerManger exception: value cannot be null. Parameter name: type

开发者 https://www.devze.com 2023-03-14 13:55 出处:网络
I try to createinstance ofServerManager (Microsoft.Web.Administration.dll) to get IIS Web Applications list. Code is running on the Windows 2008 Server, ASP.NET, IIS7.

I try to create instance of ServerManager (Microsoft.Web.Administration.dll) to get IIS Web Applications list. Code is running on the Windows 2008 Server, ASP.NET, IIS7. IIS located on the same machine. But on this line

 var serverManager = new ServerManager();

I get exception:

System.ArgumentNullException: Value cannot be null.  Parameter name: type   
at System.Activator.CreateInstance(Type type, Boolean nonPublic)    
at Microsoft.Web.Admin开发者_如何转开发istration.ConfigurationManager..ctor(ServerManager owner, String applicationHostConfigurationPath)    
at Microsoft.Web.Administration.ServerManager..ctor(String applicationHostConfigurationPath) 

What can I do?

0

精彩评论

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