Iis – Is it possible to log additional HTTP headers in IIS logs

exchange-2010iisiis-7.5log-filesweb-server

I need to analyze logs for Exchange and would like to get additional headers saved such as MS-ASProtocolVersion

Is is possible to configure IIS to log these additional headers?

POST /Microsoft-Server-ActiveSync?User=asdf@nasdf.com&DeviceId=ApplDNRJP5Dasdf&DeviceType=iPhone&Cmd=Sync HTTP/1.1
Host: email.asdf.mobi
X-MS-PolicyKey: 886721299
Accept-Language: en-us
User-Agent: Apple-iPhone5C1/1002.146
Proxy-Connection: keep-alive
Accept: */*
Content-Type: application/vnd.ms-sync.wbxml
Connection: keep-alive
Cookie: NSC_Fydibohf_2010_PXB_wtfswfs=ffffffff098a114045525asdfasdf
Authorization: Basic bWasdfasdfasdfsdfa
Content-Length: 64
MS-ASProtocolVersion: 14.1
Accept-Encoding: gzip, deflate

Best Answer

In order to log custom headers IIS Advanced Logging must be enabled. A good article on enabling advanced logging and using it to log custom fields can be found at http://www.iis.net/learn/extensions/advanced-logging-module/advanced-logging-for-iis-custom-logging

Related Topic