title: ASP.NET MVC Session across subdomains
body: <p>In my website i have implemented custom session values. In which, on log on i set the session value to some object. This object is used to extract user specific data from db.</p>
  
  <p>now the problem is If user logs in with : test1.somesite.com and logs off and again logs in with: test2.somesite.com that user is still receiving the data from object specific to test1.somesite.com.</p>
  
  <p>the point is whichever site user first logs in with the second time if he logs in with another subdomain he is always getting the data from previous sub domain login.</p>
  
  <p>on log out from specific domain i cleared all the sessions(tried everything): by putting HttpContext.session["UserDetail"] = null;, HttpContext.Session.Abandon() and also HttpContext.Session.Clear();</p>
  
  <p>but nothing seems to work</p>
  
  <p>and i also don't have much idea how session variables are treated across subdomains.</p>
  
  <p>I mean if i initialize a session with one value by visiting test1.somesite.com will that value also be visible if on the same computer and on same browser i also open test2.somesite.com.</p>
  
  <p>any help please</p>