-
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"; |
What does the Have you looked at https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#define_where_cookies_are_sent? |
Hi @wangjunjx8868. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
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: