asp.net mvc 3 - MVC and Forms Authentication in separate projects - security risk -


let's have 2 projects based on mvc 3. both of them use forms authentcation mechanism. user being logged in 1st project. goes 2nd project log in , turns out - logged in. how avoid scenario ?

if not set name of cookie used formsauthentication class encounter issue when running 2 asp.net applications @ same time. definition of property:

the name of cookie used store forms-authentication ticket. default ".aspxauth"

so should notice there 1 cookie when there should 2 (or number of applications opened).

to resolve issue should name cookie, can in web.config

<authentication mode="forms">     <forms loginurl="~/account/login" timeout="2880" name="unique_cookie_name" /> </authentication> 

Comments