views:

41

answers:

1

Hi everyone!! I have a MVC website and when I execute it, the query string (url) that appears is:

http://localhost:6970/(S(51aegi45qneolxa0oxwuzh55))/default.aspx

what the hell is that strange combination of numbers and letters??? please help!!!!! previously i had been working with the session expires to redirect to one of my views, could be something of that?? i have added the following action filter:

public override void OnActionExecuting(ActionExecutingContext filterContext) 
        {
            HttpContextBase ctx = filterContext.HttpContext;

            // check if session is supported
            if (ctx.Session != null) 
            {
                // check if a new session id was generated
                if (ctx.Session.IsNewSession) 
                {
                    // If it says it is a new session, but an existing cookie exists, then it must
                    // have timed out
                    string sessionCookie = ctx.Request.Headers["Cookie"];
                    if ((null != sessionCookie) && (sessionCookie.IndexOf("ASP.NET_SessionId") >= 0))
                    {
                        filterContext.HttpContext.Response.Redirect("~/Error/SesionExpirada", true);
                    }
                }
            }

            base.OnActionExecuting(filterContext);
        }

but if I put it in ignore it stills add that rare thing to my urls. Please help!!! thanks

+2  A: 

I think that this means that you have cookieless sessions enabled.

In your web.config set

<sessionState cookieless="false" />
Martin Smith
but if I disable it, my redirection code when session expires will work???
Nicole
As far as I know the only consequence of disabling cookieless sessions is that sessions won't work for people with cookies disabled. Unless things have changed it doesn't look like this mode even supported for MVC http://forums.asp.net/p/1517391/3634908.aspx
Martin Smith