How to best configure IIS7 logging to capture "HTTP_X_FORWARDED_FOR" header

This isn't built into IIS, but there is a module you can install that will perform this functionality. It is called ARR helper, but it will work for any proxy in front of IIS:

http://blogs.iis.net/anilr/archive/2009/03/03/client-ip-not-logged-on-content-server-when-using-arr.aspx


There is now an IIS7 module that will let you log custom headers.

How to: http://learn.iis.net/page.aspx/579/advanced-logging-for-iis-70---custom-logging/