I use Global.asax to log at the end of each request through the Application_EndRequest event. However, I see some odd behavior of some values ββstored in the HTTPContext.Current.Items collection.
Below is the debug output for NULL with a null value. You can see that there is a value, but HasValue is allowed to False ?!
{System.Nullable(Of AreaNameEnum)}
HasValue: False
hasValue: False
Value: {System.InvalidOperationException}
value: ADMIN {0}
I assume it's too late in the request lifecycle to access HTTPContext.Current - but it seems to work sometimes, and sometimes not. Can anyone shed light on what is happening?
thanks
James source
share