-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookie Domain not working #59070
Comments
Do you get the same behaviour if you remove the |
It also seems very unlikely that we are adding www to your cookie, I'd guess it's something the browser is doing. You could verify by deleting the cookie and looking at the response and viewing the |
yes,remove . ,result is www.example.com , my sub domain website(abc.example.com) not share this cookie also |
if framework website set domain result .example.com not .www.example.com, FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(2, "admin", DateTime.Now, DateTime.Now.AddDays(1),true, stuId.ToString(), "/");
HttpCookie cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ticket));
cookie.HttpOnly = true;
cookie.Domain = "example.com"; |
Is there an existing issue for this?
Describe the bug
current .NET 8.0
Cookie. Domain not working,
On signed In,
Edge browser and browser F12 key,view cookie ,I found that it automatically brought the www,result is .www.example.com,why?
Expected Behavior
On signed In Cookie Domain is .example.com
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
8.0.101
Anything else?
No response
The text was updated successfully, but these errors were encountered: