Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Isolation in a Multi-tenant ASP .NET Application

I'm building a multi-tenant ASP .NET application. Given that each tenant can configure their application dynamically (which may involve dynamic custom assemblies being loaded into memory), I need a means of isolating each tenant.

I'd prefer not to create a new Web Application per tenant for maintenance reasons.

I've was considering using the AppDomainManager to create an AppDomain per application, but it seems this is not intended to be used for ASP .NET applications.

Does anyone have some suggestions on this subject?

Thanks.

like image 527
Jeff Avatar asked Oct 10 '10 14:10

Jeff


1 Answers

I guess the question is: If you aren't into creating a Web Application, then what type of isolation is really acceptable to you?

If you really want an OS-level guarantee that assemblies won't trod on one another, I would give each their own Web Application. This is especially true if you're allowing people to load third-party assemblies, and is super-especially true if those third-party assemblies can find ways to instantiate unmanaged code.

I can see not creating a separate Web Application if it's all your (managed) code, but once you put dynamic custom assemblies into the mix, I think it's the only way to go.

like image 177
Dave Markle Avatar answered Oct 12 '22 23:10

Dave Markle