title: VB.NET Web Application - Unwanted users session sharing
body: <p>I'm quite new to vb.net as I'm much more of a PHP developer but anyway. I've built a web application but my users seem to be sharing the same session which I do not want and can't understand why. I access the object which I store all session information in from a global property in a module, could this be the reason?</p>
  
  <p>The code is as follows:</p>
  
  <pre><code>Module SiteWide
      Private mUserSession As New MyLib.User.UserSession
      Public Property gUserSession() As MyLib.User.UserSession
          Get
              If Not HttpContext.Current Is Nothing AndAlso Not HttpContext.Current.Session Is Nothing Then
                  If Not HttpContext.Current.Session("user") Is Nothing Then
                      mUserSession = HttpContext.Current.Session("user")
                  End If
              End If
  
              Return mUserSession 
          End Get
          Set(ByVal value As MyLib.User.UserSession)
              mUserSession = value
  
              If Not HttpContext.Current Is Nothing AndAlso Not HttpContext.Current.Session Is Nothing Then
                  HttpContext.Current.Session("user") = value
              End If
          End Set
      End Property
  End Module
  </code></pre>