Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What application trust level is need for ASP.NET MVC framework?

i am trying to deploy simple asp.net mvc frameworkd application in may shared hosting and i get erro like this:

Security Exception Description: 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.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
http://test.pakabink.lt/

In my control panel i am seting "ASP.NET 2.0 Full Trust". What i need to ask for server administrator to change?

like image 998
niekutis Avatar asked Apr 26 '09 19:04

niekutis


1 Answers

You should be able to bin deploy and run the MVC framework in medium trust. There is a possibility that there is some other permission that the hosting company has taken away but it should work. Are you testing with the default MVC project? If you are using other components (Structure Map, for example), that may be causing the error.

Check out Bin Deploying ASP.NET MVC from Phil Haack about deploying and the required trust level.

like image 59
Steven Lyons Avatar answered Sep 30 '22 21:09

Steven Lyons