Hi All
I am moving from classic ASP to ASP.NET so of course still like to use some of the old ways
What I want to do (have started) is on validation of user/pass I pass the returned id into a user object which then populates the user data.
If I successfully authenticate the user what is the best way to then have that users authentication known throughout the entire site?
I have been playing around with this sort of stuff:
m_User = new User(i_LoggedIn);
if (m_User.UserID != 0)
{
FormsAuthentication.SetAuthCookie(m_User.UserID.ToString(), true);
FormsAuthentication.RedirectFromLoginPage("test", true);
}
else
{
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
}
All the material that I read deals with the login processes that use the asp:login and the aspnetdb as opposed to custom code.
Any help or direction would be appreciated!
I am almost out of questions ;-)
I am moving from classic ASP to ASP.NET so of course still like to use some of the old ways
What I want to do (have started) is on validation of user/pass I pass the returned id into a user object which then populates the user data.
If I successfully authenticate the user what is the best way to then have that users authentication known throughout the entire site?
I have been playing around with this sort of stuff:
m_User = new User(i_LoggedIn);
if (m_User.UserID != 0)
{
FormsAuthentication.SetAuthCookie(m_User.UserID.ToString(), true);
FormsAuthentication.RedirectFromLoginPage("test", true);
}
else
{
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
}
All the material that I read deals with the login processes that use the asp:login and the aspnetdb as opposed to custom code.
Any help or direction would be appreciated!
I am almost out of questions ;-)