- protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e)
- {
- /// only apply session cookie persistence to requests requiring session information
- #region session cookie
- {
- /// Ensure ASP.NET Session Cookies are accessible throughout the subdomains.
- if (Request.Cookies["ASP.NET_SessionId"] != null && Session != null && Session.SessionID != null)
- {
- Response.Cookies["ASP.NET_SessionId"].Value = Session.SessionID;
- Response.Cookies["ASP.NET_SessionId"].Domain = ".know24.net"; // the full stop prefix denotes all sub domains
- Response.Cookies["ASP.NET_SessionId"].Path = "/"; //default session cookie path root
- }
- }
- #endregion
- }
Wednesday, 7 July 2010
ASP.NET SESSION STATE, COOKIES AND SUBDOMAINS
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment