views:

24

answers:

0

In my web.config file, I have the following line:

<authentication mode="Forms">
    <forms timeout="25000000"/>
</authentication>

If I login to here SpectrumBridge and check the remember me checkbox, it puts a cookie on the local machine that expires in 50+ years. However, if I login to here UDIA, it sets an a cookie that says it will expire when the browser is closed. Both logins use the same database table for users and they both use the same code for the loin click which is:

TextBox userName = (TextBox)Login1.FindControl("UserName");
CheckBox chkRememberMe = (CheckBox)Login1.FindControl("RememberMe");

if(chkRememberMe.Checked)
    FormsAuthentication.SetAuthCookie(userName.Text, true);

One thing I noticed is that if I login to the first part (SpectrumBridge) and I don't check the Remember me checkbox, it does not create an ASPXAUTH cookie, but even if I don't check the remember me for the second part (UDIA), it still creates an ASPXAUTH cookie. I am curious on why they are behaving differently