« Previous Next »

Answered Thread: How to enable extended properties of W3C log format?

Last post 10-23-2009 5:27 AM by Leo Tang - MSFT. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 10-20-2009, 5:06 AM

    • raajesh
    • Top 500 Contributor
    • Joined on 08-06-2009, 7:25 AM
    • Posts 19

    How to enable extended properties of W3C log format?

     Hi,

     How can I programatically enable extended properties of W3C log format?  I am working on IIS 5.1 using C#, I would like to enable other parameters other than default properties.

     Any sample code snippet will help me in learning.

     I appreciate  your kind help.

     

     Best Regards,

     Rajesh 

     

     

  • 10-23-2009, 5:27 AM In reply to

    Answered Re: How to enable extended properties of W3C log format?

    Hi,

    You can modify the LogExtFileFlags property to archive this:

    DirectoryEntry Entry = new DirectoryEntry("IIS://LOCALHOST/W3SVC/1");
    System.DirectoryServices.PropertyCollection props = Entry.Properties;
    props["LogExtFileFlags"][0] = Number;
    Entry.CommitChanges();

    Note: replace the Number with the sum of  flags' bitmask.

    For more information about the flags of LogExtFileFlags attribute, you can refer to:
    LogExtFileFlags
    http://msdn.microsoft.com/en-us/library/ms524906.aspx

    Leo Tang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (2 items)
Microsoft Communities