سؤال

I am using Spark view engine and I am trying to work out a way to get the views to run from a separate AppDomain. The reason I want to do this is because Spark compiles the files into assemblies and these are then added to the current AppDomain, this will not run in Medium Trust.

So my though is that if I can get Spark to add these assemblies to a new AppDomain with a differing PermissionSet then I can sandbox the code in these views.

Where does mvc pick up the view in the assembly to create the content that is pushed to the browser and can I get it to look in the new AppDomain?

هل كانت مفيدة؟

المحلول

I don't think moving to a separate appdomain is necessarily going to help you. Your best bet would be to precompile the views and then deploy them to your hosting environment.

More info on precompilation can be found here: http://sparkviewengine.com/documentation/precompiling

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top