0
votes

I am newbie to ASP.NET MVC, I developed a new web application using ASP.NET MVC, Entity Framework on .NET 4.5 and it is working just fine.

When trying to deploy onto a shared hosting server, I got an error as the Trust is set to Medium and there is noway to change it to Full.

Even on my local machine if I set Trust to Medium I got same 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.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

How could I fix my configuration to allow my application to work on Medium Trust environment. Noticing that my application is not using anything from outside.

Thanks

2

2 Answers

3
votes

ASP.Net MVC 5 no longer support partial trust for you need to develop this application in MVC 3 or MVC 4. For more information please read this this answer