YAFLogo

gmorse
  • gmorse
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
9 years ago
Hello

I have a Sitecore application which handles my my login details, I am trying to pass the .YAFNET_Authentication cookie to YAF to login.

1, If i log the user into YAF manually it all works fine

2, Log my user into sitecore works fine.

The Sitecore is in the subdomain sitecore.localhost

The YAF is inthe subdomain YAF.Localhost

Both have the

MY code that creates the cookie is as follows

HttpCookie authCookie = new HttpCookie(".YAFNET_Authentication", strEncTicket);//$"yaf{domain}");

authCookie.Domain = domain; (Loaded from the webconfig system.web/authentication authCookie.Path = "/";

authCookie.Expires = DateTime.Today.AddDays(2);

authCookie.HttpOnly = true;

HttpContext.Current.Response.Cookies.Add(authCookie);

If i remove the domain tag i can see the cookie being creates a cookie fine in on sitecore tab, if i open yaf in new tab and manually create cookie with setting from sitecore tab (changing the subdomain )and refresh the tab, YAF Logs in.

Thank you any help advice would be great fully recieved

Sponsor