How to detect whether IIS logging for particular site has been disabled or not in c#? RRS feed

  • Question

  • User-2049192058 posted

    I am i am reading the applociationHost.config of IIS application in c# application , when i disable to logging for particulate website it will add the another node in config like below 

    <location path="Testing">
                <httpLogging dontLog="true" />

    but i can not able to read this properties in c# . My C# code sample is below 

      using (ServerManager serverManager = new ServerManager())
          Configuration config = serverManager.GetApplicationHostConfiguration();

    but config varaible only has the below three section group . from this section group i am not able to read the <location> node element




    How can i detect the whether logging has been disabled or not for particular website from config file in c# application ?


    Monday, December 1, 2014 6:31 AM