Ours is a web application. The security team has suggested us to change cookie upon every escalation in the authorization.
Accordingly, I wanted to update the client side cookie after authentication. And I used the below code:
System.Web.HttpCookie cookie = Request.Cookies["ASP.NET_SessionId"];
System.Web.HttpCookie dummyCookie = new System.Web.HttpCookie("SessionId");
cookie.Value = dummyCookie.Value;
Response.Cookies.Add(cookie);
Problem is as soon as the cookie gets updated, the user is again taken as an unauthenticated user.
Thanks in advance.