I have a .NET 4.0 application with a 2.0 application as a child. The web applications are not in a multi-server environment; only one server is involved in serving these reques
There is also one more cause of this problem. Even on the same machine, same IIS and same .NET framework if one of your applications has
<httpRuntime requestValidationMode="2.0" />
then sharing authentication cookie will not work.
Removing requestValidationMode
solves the problem. But sometimes you cannot do it and it needs to stay there. I'm yet to discover what to do in such situation
You must have the same framework on the 2 applications.
httpRuntime targetFramework="4.5"
In case someone comes across this same issue, I was able to fix this error by adding some entries to the <appSettings>
section of my .NET 2.0 application's Web.config. The added entries were:
<add key="aspnet:UseLegacyEncryption" value="true" />
<add key="aspnet:UseLegacyMachineKeyEncryption" value="true" />
Edit (2012-05-04): After installing Security Bulletin MS11-100 on the server, the authentication once again broke on the 2.0 application. Adding the following to the Web.config of the 4.0 application fixed the issue:
<add key="aspnet:UseLegacyFormsAuthenticationTicketCompatibility" value="true" />
I had the same issue. In my case i had two different applications in the same server and the name attribute was the same for both.
The solution is to use a unique name for each application. See mode details here https://msdn.microsoft.com/en-us/library/1d3t3c61(v=vs.85).aspx
It is the cookie name and if you use the same name the cookie is overridden.
With the intention of aport info to the previous post, it works for me adding this keys into the APP (both 4.0) web.config:
<add key="aspnet:UseLegacyEncryption" value="true" />
<add key="aspnet:UseLegacyFormsAuthenticationTicketCompatibility" value="true" />