SaaS CMS has officially launched! Learn more now.

"Remember me" doesnt work (relate, medstore templates)


I have a relate site based on relate intranet templates ( My Remember me box doesnt work. The auth cookie is only a session cookie. What may cause this?

Even EPi's demo site failes (, but the "standard relate" demo site works. I have other sites running on the same IIS, but pure CMS 6 R2 installs which works perfactly. What I can see, the web.config is the same for the authentication part...

Mar 02, 2012 9:14

Have you set a timeout on the cookie? By default it has a very low timeout.

<authentication mode="Forms">
	<forms name=".EPiServerLogin" loginUrl="login.aspx" defaultUrl="/" timeout="50000000"/>


Mar 02, 2012 12:53

Yes i have. The thing is that the cookie is sent as an session cookie by the server, i.e. without an experial date. I think i've checked "everything"...

Is there anything that may exist in the template's code that does something? I've been looking for something in the code, but i've not found anything. 

Mar 02, 2012 15:08

Do you use the standard login page /util/login.aspx?

If you're using a custom login page you need to specify that the cookie should be persistant.

FormsAuthentication.RedirectFromLoginPage(username, true)


Mar 02, 2012 15:12

It's the standard page...

Hm.. Maybe i can attach to some event on FormsAuthentication to see what happens? Or maybe force the cookei to be a normal cookie, not a session cookie?

Mar 02, 2012 15:14

A control adapter is used to replace the ordinary login control. The open source project CSSFriendly is used and there seems to be an issue with "Remember Me".

One option is to skip using this control adapter and instead use the ordinary control. Open the file CSSFriendlyAdapters.browser located in the Circuit.RelatePlus.Intranet.Web project in the App_Browsers folder. Remove the adapter for System.Web.UI.WebControls.Login:

	<browser refID="Default">
			<!--<adapter controlType="System.Web.UI.WebControls.Login" adapterType="CSSFriendly.LoginAdapter" />-->


Another option is to handle the issue in the adapter; i.e. add the workaround suggested in this issue response Download and open the CSSFriendly solution and open the file LoginAdapter.cs. Locate OnInit and add an event listener for the LoggingIn event:

protected override void OnInit(EventArgs e)

	Login login = Control as Login;
	if (Extender.AdapterEnabled && (login != null))
		login.LoggingIn += OnLoggingIn;
		login.LoggedIn += OnLoggedIn;
		login.LoginError += OnLoginError;
		_state = State.LoggingIn;

Then add the workaround code:

protected void OnLoggingIn(object sender, EventArgs e)
	Login loginCtrl = (Login)sender;
	CheckBox rememberMe = (CheckBox)loginCtrl.FindControl("RememberMe");

	if (rememberMe != null)	
		if (rememberMe.Checked)
			loginCtrl.RememberMeSet = true;
			loginCtrl.RememberMeSet = false;


Build the solution and copy the .dll to your intranet solution. Update the reference to this .dll and build the solution.

Mar 20, 2012 11:47
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.