Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bunnynut 136 posts 318 karma points
    May 26, 2015 @ 08:49
    Bunnynut
    0

    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:

    [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.

     

    Thanks in advance

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 26, 2015 @ 10:40
    James Jackson-South
    0

    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

  • Bunnynut 136 posts 318 karma points
    May 26, 2015 @ 11:43
    Bunnynut
    0

    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' ?

  • James Jackson-South 489 posts 1747 karma points c-trib
    May 26, 2015 @ 13:32
    James Jackson-South
    0

    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.

  • Bunnynut 136 posts 318 karma points
    May 26, 2015 @ 14:00
    Bunnynut
    0

    Hmm i hope the hosting provider will give me a satisfying answer.

  • Thiago 1 post 71 karma points
    Jul 19, 2016 @ 14:34
    Thiago
    0

    I have the same problem. They have a solution?

  • James Jackson-South 489 posts 1747 karma points c-trib
    Jul 20, 2016 @ 14:29
    James Jackson-South
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft