1

I'm building a Multi-tenant website that will hold several tenants and each of them has its own configuration.

if user of tenant will attempt to connect, after aspmembership authentication he will get his configuration.

User can have access to several tenants, but still will get its tenant's configuration.

My question is about the Session: left say i have several bindings: cust1.domain.com

cust2.domain.com

cust3.domain.com

if user1 have access to cust1 and custs, will he get the same sessin

Community
  • 1
  • 1
Eddie Rozenblat
  • 832
  • 3
  • 11
  • 21
  • 1
    From your question I think this post has the answer http://stackoverflow.com/questions/2056686/asp-net-forms-authentication-and-multiple-domains look at the domain setting in the
    section - notice the preceeding "." - this allows the cookie to be read by multiple subdomains which (I think) is what you want?
    – Luke Baughan Feb 14 '13 at 17:10

1 Answers1

0

You can use the domain cookie by setting in the <forms ...> section in the web.config file. This will allow the user to login into any domain after logging into any one domain.

The domain cookie that you will be setting will look like the following.

   <authentication mode="Forms">
      <forms loginUrl="/" cookieless="UseCookies" name="FormAuthentication" domain=".domain.com" />
</authentication>

Also, ensure that the machine keys are same in all the code base that renders your *.domain.com applications.

Saravanan
  • 7,637
  • 5
  • 41
  • 72