简体   繁体   中英

Multi-Tenant ASP.NET Application

I am trying to create a multi-tenant application using ASP.NET MVC.

In order to determine which entities in a given table to use, I need to parse the domain request in order to determine which site to return to the User. Where is the best place to do this calculation and store it? It needs to be a Session/Request type variable (as opposed to an application one) - but is there a standard method for doing this? Can OWIN be used for Session-level variables?

Application_BeginRequest

is a natural candidate for this and we mostly do it there. Then, the Items container (which is of request scope) is used to store this so that it is further available down the processing pipeline.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM