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.
-
abc and xyz both are different projects with different url right ?Dhaval Pankhaniya– Dhaval Pankhaniya2017-10-18 07:29:18 +00:00Commented Oct 18, 2017 at 7:29
-
Yes absolutely , they are entirely different projects.Pashupati Khanal– Pashupati Khanal2017-10-18 07:31:00 +00:00Commented Oct 18, 2017 at 7:31
-
1then 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 ?Dhaval Pankhaniya– Dhaval Pankhaniya2017-10-18 07:35:11 +00:00Commented 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?Pashupati Khanal– Pashupati Khanal2017-10-18 07:38:24 +00:00Commented Oct 18, 2017 at 7:38
Add a comment
|
1 Answer
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
1 Comment
Pashupati Khanal
Thnaks for your answer .