entity framework - Separate subdomain for each client -
let's have table user , table products:
name company john doe 1 alex doe 2 michael doe 1 productname company tea 1 coffee 1 companyid companyname 1 comapny1 2 company2
now want have separate login companies @ company.mydomain.com , company2.mydomain.com, etc.
clients register subdomains themselves. allow me show separate list of products each subdomain. best way this? should use routing? or use javascript replace domain fake domain name? (i'm using simplemembership)
you can set "appdomain"
roles.applicationname
. if set:roles.applicationname = "company"
, roleprovider working subset of roles application=company. similarly, can setroles.applicationname = "company2"
.unfortunately, roles static object, roles.applicationname static property.
"your entire asp.net mvc application runs within appdomain, application plus requests being served users, everything!!
when create static variable, single instance declared , made available entire appdomain, every request every user see same value."
so, must lock thread while run authorize, or you can write own role provider.
Comments
Post a Comment