问题
I am trying to host my asp.net mvc 4 web app using hostgator. The problem at hand is the fact that the plan I am using only allows for the medium trust level. My application currently has the Ninject MVC package installed.
I have tried using the ".NET Framework 4.0 for medium trust environments" version of Ninject from Ninject's homepage, but alas no go.
Is there any way I can get Ninject 3.0 working with a medium trust level?
The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
来源:https://stackoverflow.com/questions/14441877/ninject-and-trust-level-medium