title: ASP.Net MVC app logout not completely logging out
body: <p>This app is running in an environment where some users are still using IE7 if that makes any difference.  What we're seeing is occasionally after someone logs out and someone else logs in they still get residue from the previous person where it may show that persons profile.  Any suggestions would be greatly appreciated.</p>
  
  <p>I'm using the following as the logout method in my asp.net mvc app</p>
  
  <pre><code>public ActionResult LogOff()
  {
  
      System.Web.HttpContext.Current.Response.Cookies.Clear();
      FormsService.SignOut();
      Session["User"] = null;
      Session.Clear();
      Session.Abandon();
      Session.RemoveAll();
  
      return Redirect("/");
  }
  </code></pre>
  
  <p>The app is using sessions saved into the database because it's running on two different web servers.</p>
  
  <p>Here's some settings from the web.config</p>
  
  <pre><code>&lt;sessionState sqlConnectionString="LiveDB" /&gt;
  &lt;authentication mode="Forms"&gt;
    &lt;forms loginUrl="~/Account/LogOn" timeout="2880" /&gt;
  &lt;/authentication&gt;
  &lt;membership&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="LiveDB" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="50" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /&gt;
    &lt;/providers&gt;
  &lt;/membership&gt;
  &lt;profile&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="LiveDB" applicationName="/" /&gt;
    &lt;/providers&gt;
  &lt;/profile&gt;
  &lt;roleManager enabled="true"&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add connectionStringName="LiveDB" applicationName="/" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" /&gt;
      &lt;add applicationName="/" name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" /&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  </code></pre>