2

Suppose I Created two projects with name ABC and XYZ , and I am using MVC's Inbuilt Identity for Security. Then Problem is, If i login in app ABC I am also Logged In In XYZ . The Authentication Cookie created by ABC app is accepted by XYZ. How to resolve this conflict.

4
  • abc and xyz both are different projects with different url right ? Commented Oct 18, 2017 at 7:29
  • Yes absolutely , they are entirely different projects. Commented Oct 18, 2017 at 7:31
  • 1
    then they should create different cookies based on domain name and url. so there is not going to be conflict. are you facing any issue right now ? Commented Oct 18, 2017 at 7:35
  • As I am Using Inbuilt Identity to reduce my headache it automatically creates the cookie is there any way i can make some changes to the cookie ,so one is different from other? Commented Oct 18, 2017 at 7:38

1 Answer 1

2

MVC5

app.UseCookieAuthentication(new CookieAuthenticationOptions { CookieName = "Project1_ApplicationCookie", ... } 

MVC6

services.ConfigureApplicationCookie(options => { options.Cookie.Name = "Project1_ApplicationCookie"; ... }); 

Rename "Project1" to something relevant and change it between projects

Sign up to request clarification or add additional context in comments.

1 Comment

Thnaks for your answer .

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.