Get all site names in IIS using C#

Posted on 2014-08-26
Last Modified: 2014-08-27
Hi Experts,

I am trying to get  all site names under iis and tried following code but could not find property under sites collection that contains names of sites.Am I missing any property?

var iisManager = new ServerManager();
        SiteCollection sites = iisManager.Sites;

Open in new window

Question by:ksd123
    LVL 74

    Accepted Solution

    foreach (Site site in sites)

    Open in new window

    Following is a decent starting reference for the library you are using:

    Author Closing Comment

    Thank you

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Problem to Popup 37 62
    Visual Studio 2013 Publish 13 30
    Allow users to select all checkboxes 6 47
    VB.Net - Find String in Array 3 17
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now