Semantic Logging not working when using EventSource.WriteEvent(Int32, Object[])

Topics: Semantic Logging Application Block
Mar 20, 2013 at 8:29 PM
Edited Mar 20, 2013 at 8:34 PM
SemanticLogging-svc.exe does not accurately capture/log my event unless I use WriteEvent(Int32, string) specifically.

Whenever I attempt the following in my EventSource:
[Event(1, Message = "Incoming Request", Level = EventLevel.LogAlways)]
internal void LogRequest(string RequestMethod, string RequestPath, string RequestUser, string RequestUserIP, string RequestForm, string RequestQuerystring, string RequestBody, string RequestSizeBytes, string RequestHeader)
            Object[] request = { RequestMethod, RequestPath, RequestUser, RequestUserIP, RequestForm,  RequestQuerystring, RequestBody, RequestSizeBytes, RequestHeader };
            WriteEvent(1, request);
An entry gets written with EventID 65534, a -1 EventKeywords, a null RawMessage, null FormattedMessage, and a Payload of: { "Format": 1, "MajorVersion": 1, "MinorVersion": 0, "Magic": 91, "TotalChunks": 1, "ChunkNumber": 0 }

Also, the console window output for SemanticLogging-svc.exe remains the same, with no new exceptions or messages.
Mar 22, 2013 at 8:16 PM
Edited Mar 22, 2013 at 8:22 PM
Using WriteEvent(Int32, Object[]) does work in a simple scenario on an .aspx page.

I'm having stability issues with SLAB and I'm not sure if it's caused by using an HttpModule to log events, or if it's my EventSource, but one thing is certain....

When calling my EventSource from an httpmodule, I do get events written (not mine) that have an EventID of 65534, EventKeywords of -1, and a Payload that is: { "Format": 1, "MajorVersion": 1, "MinorVersion": 0, "Magic": 91, "TotalChunks": 1, "ChunkNumber": 0 }

Edit: quiting the SemanticLogging-svc.exe, doing iisreset, and restarting SemanticLogging-svc.exe before running my program (aspx + http module) appears to resolve the stability issues with these rogue EventID 65534 entries.