G
Guest
Hello,
I have a series of applications that have URLS like the following:
http://www/root/app1
http://www/root/app2
http://www/root/app3
All have the same domain and root URL, but different application node names.
I need to have a single sign-on for all of the web applications. I've tried
using the same cookie name in the forms authentication configuration, but
that doesn't work. is there something I should be doing? I encode my custom
user login ID into the forms authentication cookie using the following code:
FormsAuthentication.SetAuthCookie(myUserName, false);
string uniqueKey = MyCryptoCode.Encrypt(id.ToString(), MY_COOKIE_KEY);
HttpCookie authCookie =
HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
FormsAuthenticationTicket ticket =
FormsAuthentication.Decrypt(authCookie.Value);
ticket = new FormsAuthenticationTicket(
ticket.Version,
ticket.Name,
ticket.IssueDate,
ticket.Expiration,
ticket.IsPersistent,
uniqueKey,
ticket.CookiePath);
authCookie.Value = FormsAuthentication.Encrypt(ticket);
Response.SetCookie(authCookie);
Thanks
-- Jake
I have a series of applications that have URLS like the following:
http://www/root/app1
http://www/root/app2
http://www/root/app3
All have the same domain and root URL, but different application node names.
I need to have a single sign-on for all of the web applications. I've tried
using the same cookie name in the forms authentication configuration, but
that doesn't work. is there something I should be doing? I encode my custom
user login ID into the forms authentication cookie using the following code:
FormsAuthentication.SetAuthCookie(myUserName, false);
string uniqueKey = MyCryptoCode.Encrypt(id.ToString(), MY_COOKIE_KEY);
HttpCookie authCookie =
HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
FormsAuthenticationTicket ticket =
FormsAuthentication.Decrypt(authCookie.Value);
ticket = new FormsAuthenticationTicket(
ticket.Version,
ticket.Name,
ticket.IssueDate,
ticket.Expiration,
ticket.IsPersistent,
uniqueKey,
ticket.CookiePath);
authCookie.Value = FormsAuthentication.Encrypt(ticket);
Response.SetCookie(authCookie);
Thanks
-- Jake