How to create new GUID identity in asp.net?
Good morning, please, how can I re-create user's profile identity? If non-register user make something, like create order with some profile's properties (like name, surname, phone,...), then he creates new one with new profile's properties, new values will rewrite old (save in database) properties开发者_运维知识库... (this is how it behaves when the user uses the same browser) How can I generate complete new Identity GUID?
When you create a new user using the asp.net membership provider, it will automatically log in the new user. Try explicitly logging the user out after the call to create user or you can also try deleting the cookie.
Ok Guys, it looks like, i found solution! :)
AnonymousIdentificationSection tmp = new AnonymousIdentificationSection();
HttpCookie cookies = new HttpCookie(tmp.CookieName);
cookies.Domain = tmp.Domain;
cookies.Expires = DateTime.Now.AddDays(-1);
Response.Cookies.Add(cookies);
Thanks for your help!! :)
精彩评论