开发者

Why are awkward numbers and letters in my query string?

开发者 https://www.devze.com 2023-01-01 19:54 出处:网络
I have a MVC website and when I execute it, the query string (url) that appears is: http://localhost:6970/(S(51aegi45qneolxa0oxwuzh55))/default.aspx

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 开发者_StackOverflowsession 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


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

In your web.config set

<sessionState cookieless="false" />
0

精彩评论

暂无评论...
验证码 换一张
取 消