Recently when i try to start a web site using the following code it is returning null and i have getting all the website using severmanager object Iam getting all the visual web projects in asp.net web pagethis one
how to resolve this issue and can i get all the performance data raw values from iis performance counters at a time?
ServerManager IIS = new ServerManager();
List<string> iissites = new List<string>();
foreach (Site site in IIS.Sites)
{
iissites.Add(site.Name.ToString());
}
foreach (Site site in IIS.Sites)
{
//Console.WriteLine(String.Concat
//(
// site.Name, " , ",
// site.Id, " , ",
// //site.State, " , ",
// site.Applications["/"].VirtualDirectories[0].PhysicalPath
//));
Console.WriteLine(site.Name.ToString());