WCF Current Context is Null
I implemented a custom WCF trace listener and writing the logs to a CSV
file. In the custom listener i'm trying to access the current request Url.
var url = HttpContext.Current != null ?
HttpContext.Current.Request.Url :
null;
Most of the time this works but eventually HttpContext.Current becomes
null. This mostly happens when a ServiceLevelReceiveRequest hits the trace
listener.
Is there a reason for this behavior ?
No comments:
Post a Comment