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 /[email protected]&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
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
You can use failed request tracing in IIS to include status code 200. This would log successful requests too and you can view all request headers in the "request details" > "general request headers" section.