0

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 issueoutput of  code snippet 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());
Community
  • 1
  • 1
chinna2580
  • 2,065
  • 2
  • 16
  • 30

1 Answers1

1

Thanks for your feedback, I have solved my problem by creating a web service in visual studio 2010 and linking ,i Mean i have a web reference to the asp.net project and i have called that web service methods in my asp.net web application. and now it is working fine ! Thanks and Regards Suresh chinna

chinna2580
  • 2,065
  • 2
  • 16
  • 30