I have created a website using the latest of Umbraco which all went very smoothly. But i have now published the website to the production environment and i recieve the following error:
Server Error in '/' Application.
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.SecurityPermission, mscorlib, Version=4.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.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Web.Hosting.HostingEnvironment.RegisterObject(IRegisteredObject obj) +24
Examine.ExamineManager..ctor() in ExamineManager.cs:25
Examine.ExamineManager..cctor() in ExamineManager.cs:36
I know would be able to fix this by setting the trust level to full in the web.config but when i do that i get another error stating that it was locked at a higher level. I have already contacted the hosting provider and still waiting for an answer, but i was also wondering if there are any alternatives in case they dont provide me with a satisfying answer.
With Godaddy I believe you will be also using Plesk to manage the server. You will have to modify the settings their also most likely in order to provide the correct folder permissions for Umbraco to run. "App_Data, config" etc need writeable permissions.
Once you have the correct permissions and have restarted Umbraco it should be ok.
Allthough i am not using Godaddy, i am managing the website thorugh Plesk. There is an option Code Access Security (CAS) which i have already set to Full but still i receive that same error.
Running Umbraco under trust level medium
Goodday,
I have created a website using the latest of Umbraco which all went very smoothly.
But i have now published the website to the production environment and i recieve the following error:
Server Error in '/' Application.
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.SecurityPermission, mscorlib, Version=4.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.
Stack Trace:
I know would be able to fix this by setting the trust level to full in the web.config but when i do that i get another error stating that it was locked at a higher level. I have already contacted the hosting provider and still waiting for an answer, but i was also wondering if there are any alternatives in case they dont provide me with a satisfying answer.
Thanks in advance
Hi there,
There are no workarounds for trust setting I'm afraid. You have to go with Full Trust.
Despite what Godaddy say in their FAQ, Medium trust doesn't isolate applications and has actually been obsolete for a few years now.
http://stackoverflow.com/questions/16849801/is-trying-to-develop-for-medium-trust-a-lost-cause
You should be able to change that setting.
https://support.godaddy.com/help/article/2531/what-trust-level-can-i-use-when-running-asp-net?countrysite=uk
With Godaddy I believe you will be also using Plesk to manage the server. You will have to modify the settings their also most likely in order to provide the correct folder permissions for Umbraco to run. "App_Data, config" etc need writeable permissions.
Once you have the correct permissions and have restarted Umbraco it should be ok.
Cheers
James
Hi James,
Allthough i am not using Godaddy, i am managing the website thorugh Plesk.
There is an option Code Access Security (CAS) which i have already set to Full but still i receive that same error.
What do you mean exactly with 'restart Umbraco' ?
Sorry, I misread Goodday! Silly me!
You should be able to recycle the application pool or restart the website somewhere in your website management. Most providers offer that.
Hmm i hope the hosting provider will give me a satisfying answer.
I have the same problem. They have a solution?
Don't use Medium Trust. It's long obsolete. If your service provider is allowing only this, find a new one.
is working on a reply...