title: MVC Session id loading data from database of users with a different id
body: <p>I have developed a career application page using MVC and EF where the user when loading the page gets a random unique id to which I add some extra numbers and then assign(?) it to a session id variable like below:</p>
  <pre><code>        var uniqueID = System.Guid.NewGuid().ToString();
          var tempcount = (db.Applicants.Select(x =&gt; x)).Count();
          user.FormId = tempcount + &quot;_&quot; + uniqueID;
          Session[&quot;id&quot;] = user.FormId;
  </code></pre>
  <p>Scrolling down the form the user must complete tables that include previous work experience, qualifications etc.</p>
  <p>To load data on each for the specific user I do the following:</p>
  <pre><code>        public ActionResult GetData(Applicant applicant)
          {
             
              db.Configuration.LazyLoadingEnabled = false;
              db.Configuration.ProxyCreationEnabled = false;
              var tosee = (string)Session[&quot;id&quot;];
              IEnumerable&lt;WorkExp&gt; workexpList = db.WorkExps.Where(x =&gt; x.FormId == tosee).ToList();
              
              return Json(new { data = workexpList }, JsonRequestBehavior.AllowGet);
          }
  </code></pre>
  <p>For each table there is a similar method like the above.</p>
  <p>Every once in a few months I receive complaints from users telling me they can see the data of other random applicants!</p>
  <p>Can someone explain me why could this be happening?</p>