According to this documentation you can configure IIS 10 on Windows Server 2016 to write custom fields as long as "The total amount of data added in custom fields cannot exceed 65,536 bytes"
I have configured a custom field to write the cookies from Header and another from the server variable into the logs and this works just fine.
But only 4096 bytes are written to the log no matter what value I put in maxCustomFieldLength.
When I send 8k of data in the cookies and I:
- set maxCustomFieldLength to 4096 I only get 2048 bytes in the log file.
- increase maxCustomFieldLength to 65536, I only get 4096 bytes in the log file.
I have verified using fiddler that the browser requests are sending the full 8k cookies value and that they are not truncating the value to 4096 at the client.
Any ideas why IIS is truncating the cookies value to 4096 and not respecting maxCustomFieldLength greater than 4096?