iam3yal
iam3yal

Reputation: 2339

ASP.NET MVC plugins and AppDomain

I had a need to develop ASP.NET MVC application where one or more assemblies are considered a plugin, these assemblies are loaded dynamically by ASP.NET during the initialization phase.

I've done that and everything is working pretty good my question is whether I should load them into their own AppDomain and is doing something like the example below make sense in this context?

AppDomain domain = AppDomain.CreateDomain(asmName.Name, AppDomain.CurrentDomain.Evidence, domainSetup, trustedPermissionSet);

Assembly assembly = domain.Load(asmName); //Assembly.Load(asmName);

BuildManager.AddReferencedAssembly(assembly);

The reason I'm asking is I don't really know how the BuildManager handles the assemblies in ASP.NET, any clarification, pros and cons of this approach would be great.

Thank you for any help you can provide.

Upvotes: 1

Views: 2295

Answers (1)

iam3yal
iam3yal

Reputation: 2339

I posted the question in the ASP.NET MVC forum and it seems like I got most of the information I was looking for.

Upvotes: 1

Related Questions