2

Im using Microsoft.web.administration class to find all sites in IIS. It executes without any issue, but returning sites from another webserver. I guess its IIS express on my PC as part of VS. So how to specify my default webserver where the sites to be fetched. Reference DLL was from windwos\system32\inetsrv\Microsft.web.admnistration This is the code am using

 Dim sm As New ServerManager()

 For Each Sites In sm.Sites
    dd_sites.Items.Add(New ListItem(Sites.Name, Sites.Id))
 Next

It is not returning any sites from my IIS. It returns 2 sites which I have no idea from where it is taking. OS is Win 10

Sandeep Thomas
  • 4,303
  • 14
  • 61
  • 132

0 Answers0