2011-06-23 30 views
-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 
    } 
} 
+0

复制到http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests – Korayem

回答