开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜