How to login yetanotherforum with my websites login?

822 Views Asked by At

I have a ASP.NET MVC3 website. I integrated Yaf 1.9.6.1 into my website's /forum folder successfully. And I have same users in my two user tables. How Can I login yaf with my web sites login?

1

There are 1 best solutions below

0
On

Resolved.

I created machine key and I used it on application and child application's web config.

And I used yaf.net cookie in my login page.

This is my code:

FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, Form.email, DateTime.Now, DateTime.Now.AddMinutes(30), false, "", "/");
string strEncTicket = FormsAuthentication.Encrypt(ticket);
HttpCookie authCookie = new HttpCookie(".YAFNET_Authentication", strEncTicket);
authCookie.Path = "/";
HttpContext.Response.Cookies.Add(authCookie);