ASP.NET MVC membership login for different domain

157 Views Asked by At

I am using one membership database for different domain. When I login in one domain, I want to automatically also perform a login for different domain in same browser.

1

There are 1 best solutions below

0
Win On

Answer is no. Due to JavaScript Security, one cannot reads cookie set by others.

For example, www.mycompany.com cannot read cookie set by www.yoursite.com.

However, if those two websites are in different sub-domains, you can configure them to share the same cookie.

For example,

  • one.mycompany.com
  • two.mycompany.com

Note: ASP.Net offers Token Based Authentication, but you cannot use it with ASP.Net Membership.