Forms Login, Cookie and IIS

May 28 2008 9:14 AM

I am using forms authentication for an ASP.NET 2 APP. I've added a 'Remember Me' option.  This works fine when running in Visual Studio, But when delivered onto IIS 6 I always have to log in, regardless of whether I have checked 'Remember Me'

The authorization section of my web.config  looks this:

<authentication mode= "Forms">

<forms name=".ASPXAUTH"

loginUrl="LoginPage.aspx"

timeout="30240"

slidingExpiration="true"

cookieless="UseCookies"

enableCrossAppRedirects="false"

/>

And the code to log in is:

FormsAuthentication.RedirectFromLoginPage(UserNameTextBox.Text.ToString(), ChkRememberMe.Checked);

(Where ChkRememberMe is the check box).

Any ideas?

Ash..


Answers (2)