I would simply like to append an additional value which is generated at runtime in a page to my IIS log entry for the current request (or as an alternative, overwrite one of the standard fields with my custom value).
I can’t find a way to do this and I can’t find an example of writing a custom log handler in C# (I’m not proficient in С++)
Any help is appreciated, thanks.
If you were using IIS 7.x you could achieve this using the Advanced Logging extension.
Using this you can source data from custom fields from a number of different sources. There’s an article on setting this up here:
In IIS6 you’d need to implement your own custom logger, I don’t think there’s a way to intercept logging events to the default logger (iislog.dll) and add extra data:
Your logger would probably also have to be written in C++ for IIS6 unless you could coerce the .NET runtime to load inside a COM wrapper component.