I have two websites with authorized membership providers that are hosted on the same server on the same Web in different web applications and different application pools.
I used to have a problem that I couldnβt log in to both sites together. Thanks to the Remy post , this now works, I had to add the name attribute to the forms element.
But now I had a problem that the remember-me option of asp login-control stopped working. The user is disconnected after a normal session timeout.
The authentication attributes in the web.config file are as follows:
<authentication mode="Forms" > <forms loginUrl="~/UserMgmt/Login.aspx" timeout="400000" slidingExpiration="true" name="NameOfTheSite"/> </authentication>
I also set a cookie name for auto-mode forms for different names.
Is there anything else I need to add for the mem-me function to work?
Update
I noticed that if I turn off encryption and verification for authentication cookies, the problem goes away. If I either activate encryption, verification, or both, the problem arises again.
I also know that it does not depend on cookie names (they can even be identical). Maybe this information helps someone understand what is happening?
Update 1
Thanks to Jason Keely for solving this problem. I would never have found it. In the meantime, I found the relevant information in msdn. In How to configure MachineKey in ASP.NET 2.0 , the "Web farm deployment considerations" section says:
If you want to isolate the application from other applications on the same server, put <machineKey> in the Web.config file for each application on each server in the farm. Make sure you use separate key values ββfor each application, but duplicate each application key on all servers in the farm.
HCL
source share