-1
public class CustomRoutingHandler : MvcRouteHandler
{
  protected override IHttpHandler GetHttpHandler(RequestContext requestContext)
  {

     requestContext.HttpContext.Session is NULL;
     //Is there any way to access Session from there ?

     return FindHttpHandler(requestContext);
     // In created handler Session is not null
  }
}
tereško
  • 58,060
  • 25
  • 98
  • 150
mironych
  • 2,938
  • 2
  • 28
  • 37
  • duplicate to http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests – Korayem Dec 14 '11 at 13:32

1 Answers1

0

Perhaps you are encountering this issue: see http://www.heartysoft.com/aspnet-routing-iis7-remember-modules.

The solution is to remove and add session state module again.

Also see the related SO question: HttpContext.Current.Session is null when routing requests

Community
  • 1
  • 1
VinayC
  • 47,395
  • 5
  • 59
  • 72