title: System.ObjectDisposedException: The ObjectContext instance has been disposed and can no longer be
body: <p>Login method:</p>
  
  <pre><code>    [HttpPost]
      [ValidateAntiForgeryToken]
      public ActionResult Login([Bind(Include = "Id,Mail,Pass")] LoginMember member)
      {
          if (!(ModelState.IsValidField("Mail") &amp;&amp; ModelState.IsValidField("Pass")))
          {
              return View(login);
          }
  
          var areThere = db.LoginMember.Any(x =&gt; x.Mail == member.Mail &amp;&amp; x.Sifre == member.Sifre);
  
          if (areThere)
          {
              var name = db.LoginMember.Where(x =&gt; x.Id == member.Id).Select(x =&gt; x.Name);
  
              Session["login"] = name;
              return RedirectToAction("Index", "Index");
          }
      }
  </code></pre>
  
  <p>This method is running, session is creating "Session["login"] = name;" and going to "return RedirectToAction("Index", "Index");".</p>
  
  <p>Index view:</p>
  
  <pre><code>@{
      Layout = null;
  }
  
  @Session["login"]
  
  &lt;html&gt;Index&lt;/html&gt;
  </code></pre>
  
  <p>When Index view is running, has an error that is "System.ObjectDisposedException: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.", what is the wrong?</p>