I
Imran Aziz
Hello All,
I cannot seem to get createPersistentCookie option of
FormsAuthentication.RedirectFromLoginPage work. Even if I set it to true the
cookie is setup to expire after 30 min ( default settings )
Can you please suggest as to what can be done to sort this one out.
My code is as under
web.config
<authentication mode="Forms" >
<forms name="mysession"
loginUrl="login.aspx"
protection="All"
slidingExpiration="true"
path="/"
/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
And then in the login page I have this code
if (objSec.AuthenticateUser(txtUserName.Text, txtPassword.Text))
{
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text,true);
}
else
{
lblResults.Text = "Invalid Credentials: Please try again";
}
Can anyone please help to sort this one out.
Thanks a lot,
Imran.
I cannot seem to get createPersistentCookie option of
FormsAuthentication.RedirectFromLoginPage work. Even if I set it to true the
cookie is setup to expire after 30 min ( default settings )
Can you please suggest as to what can be done to sort this one out.
My code is as under
web.config
<authentication mode="Forms" >
<forms name="mysession"
loginUrl="login.aspx"
protection="All"
slidingExpiration="true"
path="/"
/>
</authentication>
<authorization>
<deny users="?" />
</authorization>
And then in the login page I have this code
if (objSec.AuthenticateUser(txtUserName.Text, txtPassword.Text))
{
FormsAuthentication.RedirectFromLoginPage(txtUserName.Text,true);
}
else
{
lblResults.Text = "Invalid Credentials: Please try again";
}
Can anyone please help to sort this one out.
Thanks a lot,
Imran.