gmorse
  •  gmorse
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
2016-01-22T17:39:51Z
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 <Forms domain set to .Localhost

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 <forms)
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

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved