Can the client determine if the HttpContext has been created or not?
We are getting a lot of hits from Googlebot and BingBot and it looks like none of these requests have an HttpContext.
I originally thought that every HTTP request would get a context, which is obviously not the case, so I'm trying to understand how the HttpContext is created, is it part of the negotiation between client and server?
a source to share
The client doesn't define it in any way, in what context are you checking HttpContext
? Are you sure you are HttpContext.Current
null? (And you don't look at HttpContext.Current.Session
?)
There are some places in the lifecycle where it is not available, but this will not differ from client to client.
If you're interested in learning more, I recommend Rick Strall's Low-Level Look at ASP.NET Architecture, it gives an overview of where things get created / destroyed in the request lifecycle ... it hasn't changed much since writing.
a source to share