i have two websites with FormsAuthentication which are installed on the same machine. Now if i use firebug and firecookie i can see that the applications receive both cookies the own AuthenticationCookie and the Cookie from the other one.
The cookies have different names.
Application 1:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" name=".Cookie1" />
</authentication>
Application 2:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" name=".Cookie2" />
</authentication>
Is there any reason for this behavior?
Regards
Your problem is that since both application run on localhost the Host of both cookies is most probably the same (localhost).
A possible solution would be to set the
domainandnamein the web.config file as per thisThere is also this answer on stackoverflow