We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Download for Advanced Logging for IIS 7/7.5 No Longer AvailableRSS

3 replies

Last post May 27, 2021 02:28 PM by wandyboi

  • Download for Advanced Logging for IIS 7/7.5 No Longer Available

    May 26, 2021 08:06 PM|Kat4Birds|LINK

    I have a few servers still running Windows 2008 R2 & IIS 7.5, & I need to add the x-forwarded-for field to my IIS logs.  PowerShell's "Add-webConfigurationProperty" cmdlet added the field to my 2012 & 2019 servers, but I still do not have x-forwarded-for on my 2008 servers.   I did not get an error when I ran the cmdlet on my older servers, but the applicationHost.config was not updated. 

    I also checked Configuration Editor - I navigated to system.applicationHost/Sites/SiteDefaults/Logfile, but the section for "CustomFields" is not present.  I found multiple Microsoft documents that suggested installing Advanced Logging for IIS, but all the links for downloading the extension resulted in a 404 error.  

    What do I need to do to enable logging x-forwarded-for on Windows 2008 R2 / IIS 7.5?

  • Re: Download for Advanced Logging for IIS 7/7.5 No Longer Available

    May 27, 2021 02:53 AM|lextm|LINK

    Windows Server 2008 R2 has reached end of life, so you are not supposed to use it any more. That's why Microsoft removed all legacy documentation and bits.

    Lex Li
    Want to have a chat on the issues you meet? Book an appointment at https://buy.stripe.com/cN24ia0yi7sAdIA7sv
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Download for Advanced Logging for IIS 7/7.5 No Longer Available

    May 27, 2021 03:14 AM|samwu|LINK

    Hi Kat4Birds,

    Kat4Birds

    What do I need to do to enable logging x-forwarded-for on Windows 2008 R2 / IIS 7.5?

    You can try the following steps:

    1. Open IIS Manager
    2. On server, site or application level, double click “Advanced Logging
    3. In the action pane on right side, click “Enable Advanced Logging
    4. In the action pane, click “Edit Logging Fields
    5. In the new window, click “Add Field
    6. In “Add Logging Field” window, fill out the following fields:
    7. Field Name: X-Forwarded-ForSource type: Response HeaderSource name: X-Forwarded-For
    8. Click “OK
    9. In the middle pane, select the default log definition %COMPUTERNAME%-Server. Click “Edit Log Definition
    10. Click “Select Logging Fields” 
    11. Select “X-Forwarded-For” from the list. Click “OK
    12. Click “Apply” in the actions pane

    After these steps, wait for a new log file to be created. Column changes will be effective only after a new log file is created. You may need to generate some traffic to fill the current log file.

    And here is the PowerShell command to add X-Forwarded-For header at the server level.

    Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter "system.applicationHost/sites/siteDefaults/logFile/customFields" -name "." -value @{logFieldName='X-Forwarded-For';sourceName='X-Forwarded-For';sourceType='RequestHeader'}

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: Download for Advanced Logging for IIS 7/7.5 No Longer Available

    May 27, 2021 02:28 PM|wandyboi|LINK

    I am currently facing the same issue as the OP, but I had to reply to your comment. The advanced logging that you are referring to? Is only possible through the installation of the advanced logging module, which has been removed. You instructions would only be helpful in the presence of the advanced logging module (The title of this thread).