Cookie not deleted after logout with Asp.Net 5 Identity 3.0
<p>I do have an Asp.Net MVC Application (version 6.0.0-rc1-final) with custom role and user stores. After some <a href="https://stackoverflow.com/questions/34879171/why-is-user-identity-null-after-login-with-aspnet-identity-3-0">struggling</a> I finally could create a working login mechanism. However I do have now troubles to create a clean logout. What my logout code in the controller currently looks like:   </p>

<pre><code>public async Task&lt;ActionResult&gt; Logout()
{
    if (User.Identity.IsAuthenticated)
    {
    await SignInManager.SignOutAsync();

    }

    return RedirectToAction("Index", "App");
}
</code></pre>

<p>The problem with this code is, that one cookie is not deleted: <strong>.AspNet.Microsoft.AspNet.Identity.Application</strong></p>

<p>As long as I don't delete the cookie manually the application is in a dirty  state and throws null pointer exceptions because <strong>User.Identity</strong> is null.  </p>

<p>I have found a <a href="https://stackoverflow.com/questions/28999318/owin-authentication-signout-doesnt-seem-to-remove-the-cookie">question on stackoverflow</a> describing a similar scenario. But the solution there is not appropriate for me because I am using MVC 6 which does not have System.Web any more.</p>

<p>I do also have a sample solution which just works fine. In this solution the mentioned cookie is never created. Perhaps the right solution is not to delete the cookie after logout, but rather to prevent somehow the creation of the cookie.</p>