Does FormsAuthentication.SetAuthCookie() make a session based cookie?

后端 未结 2 817
渐次进展
渐次进展 2021-01-11 20:42

Ok I\'m rather confused, does FormsAuthentication.SetAuthCookie() in asp.net create a session based cookie or not? From what I gather to put something in a session you would

2条回答
  •  盖世英雄少女心
    2021-01-11 21:15

    I'm not sure exactly what you're asking, but if your question is how can you access Session["userAge"] without an auth cookie, the answer is because it's a separate entity from the session.

    The auth cookie (default name .ASPXAUTH) is created before the session is even started so it can't be based on the session.

提交回复
热议问题