Randomize Cookie - 2 apps in dev mode

Mar 2, 2013 at 1:28 PM
Hello,
I noticed that when I have 2 applications using CodeFirst Membership Provider running at localhost, the cookies conflicts one with the other, so I can't have 2 logged in users for the same app. Is there any flag or something allowing me to specify the application and use both apps at the same time in dev mode?
Apr 2, 2013 at 7:41 AM
When you have 2 applications you have to have 2 web.config sections with forms auth.
For each of them you can setup cookie name (same as standard asp.net forms auth functionality)

if other case, when you have to work with 2 auth cookies in same application you have to "develop" forms auth. ticket write/read/check - custom functionality instead:
  • FormsAuthentication.SetAuthCookie(Username, false);
(usual it needs when you have backend which works in same context with frontend- but is better to split this to 2 applications, where backend app - is subfolder of frontend app [then you will get 2 web.configs both with individual authentication sections)

additionally: have you checked: WIF (is that what you need?)