asp.net - SAAS based mobile application -


we developing saas based mobile application in asp.net.

in our business domain have different companies , flows under those. each company has different url, when super admin create company on front end , parse url load each company specific logos , other settings.

we confused url management different companies. how should handle different sub domain urls hitting same physical location? , please share other guidelines must follow develop saas based web site.

identifying tenants url standard in developing saas applications.

it pretty easy , straight forward too. experience, suggest following

  1. configure iis site use root level domain (i.e. yourawesomeapp.com). makes subdomain request hit same site.
  2. store tenants url tenant1.yourawesomeapp.com, tenant2.yourawesomeapp.com, etc., in tenant table
  3. tell tenant use url access application
  4. write httpmodule, in postauthenticaterequest event grab current request url , verify tenanturlmapping entries (cache url <-> tenant mapping in dictionary @ application start improve performance)
    • if request domain not in tenanturlmapping; deny access
    • if request authenticated, verify authenticated tenant url/id sames current one, else deny access (tenant url/id can stored in cookie in encrypted format when logon)
    • load required settings , store them in httpcontext.items use in later part of request.

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -