© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
18 replies
Philskillz_

✅ ASP.NET EFC MVC deletes authentication cookie after next request.

I've been having this issue that my asp.net app is deleting the login cookie right next request after it set it.
When i post to /login i get this response header:
Set-Cookie:
.AspNetCore.Cookies=CfDJ8JKa6jJ<shortened>; expires=Wed, 20 Sep 2023 17:55:07 GMT; path=/; secure; samesite=lax; httponly
Set-Cookie:
.AspNetCore.Cookies=CfDJ8JKa6jJ<shortened>; expires=Wed, 20 Sep 2023 17:55:07 GMT; path=/; secure; samesite=lax; httponly

After that it redirects me to /me page and /me page responds with this header (It unsets the cookie)
Set-Cookie: .AspNetCore.Cookies=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; secure; samesite=lax; httponly
Set-Cookie: .AspNetCore.Cookies=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; secure; samesite=lax; httponly


I have no clue why it does that.
Please help me
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

ASP.NET MVC
C#CC# / help
3y ago
ASP.NET MVC
C#CC# / help
3y ago
Asp.Net 7.0 MVC Project - Authentication/Authorization
C#CC# / help
2y ago