Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net ServerManager找不到正确的Web服务器_Asp.net_Vb.net_Iis_Servermanager - Fatal编程技术网

Asp.net ServerManager找不到正确的Web服务器

Asp.net ServerManager找不到正确的Web服务器,asp.net,vb.net,iis,servermanager,Asp.net,Vb.net,Iis,Servermanager,我正在使用Microsoft.web.administration类查找IIS中的所有站点。它执行时没有任何问题,但从另一个Web服务器返回站点。我猜它的IIS express在我的PC上是VS的一部分。因此,如何指定要获取站点的默认Web服务器。 引用DLL来自windwos\system32\inetsrv\Microsft.web.administration 这是我使用的代码 Dim sm As New ServerManager() For Each Sites In sm.Si

我正在使用Microsoft.web.administration类查找IIS中的所有站点。它执行时没有任何问题,但从另一个Web服务器返回站点。我猜它的IIS express在我的PC上是VS的一部分。因此,如何指定要获取站点的默认Web服务器。 引用DLL来自windwos\system32\inetsrv\Microsft.web.administration 这是我使用的代码

 Dim sm As New ServerManager()

 For Each Sites In sm.Sites
    dd_sites.Items.Add(New ListItem(Sites.Name, Sites.Id))
 Next
它不会从我的IIS返回任何站点。它返回2个站点,我不知道它从哪里来。操作系统是赢10