gmorse
  • Posts: 1
  • Joined: 23/11/2015
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
Users browsing this topic
    Forum Jump  
    • You cannot post new topics in this forum.
    • You cannot reply to topics in this forum.
    • You cannot delete your posts in this forum.
    • You cannot edit your posts in this forum.
    • You cannot create polls in this forum.
    • You cannot vote in polls in this forum.

    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