HI All,
I am working on visual studio 2010 express edition.
I have one application developed in VC# MVC3 architecture.
I used form authentication and when user login into application I store some usefull infomration like user fullname its user id in cookies.
Below code to add cookies.
FormsAuthentication.SetAuthCookie(model.UserName, true);
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
user.UserName,
DateTime.Now,
DateTime.Now.AddMinutes(60),
isPersistent,
user.FullName + "|" + user.UserId,
FormsAuthentication.FormsCookiePath);
string encTicket = FormsAuthentication.Encrypt(ticket);
// Create the cookie.
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, encTicket));
I am retriving same cookie info using below code.
FormsAuthentication.Decrypt(Request.Cookies[0].Value).UserData;
Code is working fine.
BUT if I open VS 2010 as Administrator and try to run above appliction behaviour is different
1) Request.Coookie[0] already exist (Proxy) and it store URL information.
2) When my code create cookies it set as second cookies.
So FormsAuthentication.Decrypt(Request.Cookies[0].Value).UserData; throw exception.
I can fatch cookie by cookie name but I just wanted to know why this proxy cookie get created only if I open VS 2010 as administrator.
Appreciate for your time and response.
Thanks,