Go to subdomain
-
hi ,there .i will go to subdomain from the root site .the root site have a session item which i need to it in the subdomain but when i go to the subdomain from root site not exist session items. help me . thanks
-
hi ,there .i will go to subdomain from the root site .the root site have a session item which i need to it in the subdomain but when i go to the subdomain from root site not exist session items. help me . thanks
ASP.NET cookies-based session doesn't work with subdomain.. but there are three workaround to achieve your goal. 1) Use "out-of-proc StateServer" instead of normal cookie-based session OR 2) Use the cookies instead of session... OR 3) As "=?Utf-8?B?RG91Zw==?=" suggested here, set the value of session in every page..
Response.Cookies["ASP.NET_SessionId"].Value = Session.SessionID; Response.Cookies["ASP.NET_SessionId"].Domain = ".mydomain.com";
Hope it helps.Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)