Hi, I've just recently downloaded and installed YAF for a client, but I'm having a little bit of trouble integrating it into the current project. Authentication( with yaf stored procedure) works fine but its not setting the cookie to authenticate the user on the forum, although the code is almost the same as the login.acx page. heres the source if anyones interested.
If NewUser.DeCrypt(NewUser.password) = UCase(txtPassword.Text) Then
Dim dl As New DataLayer()
Dim params As Object() = {1, txtUserID.Text,FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text.ToUpper(), "md5")}
Dim uID As Integer = dl.execScalar("yaf_user_login", params)
If uID > 0 Then
Dim idName As String = String.Format("{0};{1};{2}", uID, 1, txtUserID.Text)
'User is valid...
Label1.Text = NewUser.FirstName & " " & NewUser.LastName
LoadSessionVariables(NewUser)
FormsAuthentication.SetAuthCookie(idName, False)
Response.Redirect("main.aspx", False)
End If
it all executes fine and returns the uID but its not setting the session. both folders are virtual directories the yaf forum is located in the root/forum/ folder. Thanks.