HttpContext. Current. Session simply returns null if there is no session available . The HttpApplication ‘s implementation of the Session property throws an HttpException with the message Session state is not available in this context. rather than returning a null reference.
What is HttpContext current session C#?
HttpContext. Current. Session simply returns null if there is no session available . The HttpApplication ‘s implementation of the Session property throws an HttpException with the message Session state is not available in this context. rather than returning a null reference.