Question

I'm reading a book about ASP.NET MVC 2, and when I read about how it uses reflection to figure out parameters or how to use Ninject in order to introduce a loosely coupled model I wonder... will this work in a partial trust environment?

I remember, that one of the restrictions in partial trust is reflection, and that is blowing my mind :(

Any experience about this?

Thanks a million.

Was it helpful?

Solution

I was able to publish a couple of websites using asp.net mvc 2 and ninject to my godaddy shared hosting (partial trust environment). I don't think you will have a problem.

Bob

P.S. Be sure to run you dev environment in partial trust. That way you find out sooner than later if there are issues.

P.S.S. Here is a link to one of the projects. There may be some code / discussion that may be useful.

http://blog.bobcravens.com/2010/07/using-nhibernate-in-asp-net-mvc/

OTHER TIPS

While MVC2 works perfectly fine in partial trust environments (both GAC'd and bin deployed), Ninject may not.

I believe Ninject uses code generation, which is not possible in partial trust environments unless Ninject itself is GAC'd. This is not likely as most hosting providers won't GAC many external libraries. What version of Ninject are you using?

Ninject 2 I believe works fine in partial trust.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top