Copied to clipboard

Flag this post as spam?

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


  • Anuj Singh 7 posts 87 karma points
    Apr 15, 2020 @ 10:35
    Anuj Singh
    0

    Unable to host Umbraco CMS at Plesk Web Hosting. Getting System.Security.SecurityException: Error

    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 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 failed.]
       System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +96
       System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +80
       System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +288
       System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +70
       System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
       System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70
       System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +40
       System.Type.GetType(String typeName) +30
       System.CodeDom.Compiler.CompilerInfo.get_IsCodeDomProviderTypeValid() +10
       System.Web.Compilation.CompilationUtil.GetRecompilationHash(CompilationSection ps) +2399
       System.Web.Configuration.CompilationSection.get_RecompilationHash() +92
       System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDateInternal(Int64 cachedHash) +502
       System.Web.Compilation.BuildManager.CheckTopLevelFilesUpToDate(Int64 cachedHash) +53
       System.Web.Compilation.BuildManager.ExecutePreAppStart() +133
       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +695
    

    Further, I modify the Web.config file and added , see code below:-

    <system.web>
    <customErrors mode="Off" />
    ...
    ...
    <trust level="Full" />
    </system.web>
    

    After modifying the Web.config file I am getting Configuration Error, see the full error below

    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    
    Parser Error Message: This configuration section cannot be used at this path.  This happens when the site administrator has locked access to this section using **<location allowOverride="false">** from an inherited configuration file.
    
    Source Error:
    
    An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
    

    I also change the required File and folder permissions guided by the Umbraco CMS Umbraco CMS Setup Guide-> File and folder permissions

    Please help me with how I can host Umbraco ASP.NET CMS on Plesk Web Hosting Environment.

    Server Details:

    Hosting Provider: Plesk

    .Net framework version I am using 4.7.03062

  • Asembli 81 posts 255 karma points
    Apr 15, 2020 @ 15:18
    Asembli
    100

    Hi,

    ** is not valid web.config format. Try

    <system.web>
       <trust level="Full" />
    </system.web>
    

    Anyway we hosted in three different plesk environments, without issues (without this setting also).

    Try ask hosting provider to switch to full trust mode.

    Regards,

    /Asembly

  • Anuj Singh 7 posts 87 karma points
    Apr 15, 2020 @ 16:25
    Anuj Singh
    0

    Thank you for your reply, actually, I mistakenly typed the ** before and after the <trust level="Full" /> in the question. Sorry for my mistake. I also tried the same configuration as you suggested but the error remain the same. No Luck. :-(

  • Asembli 81 posts 255 karma points
    Apr 15, 2020 @ 17:23
    Asembli
    0

    Hi,

    then please check if the host provides a 'full trust' mode at all. I know, from my experience, that cheaper providers do not allow this. Maybe if you tell here, which host you are using (and which package)? Like here:

    enter image description here

  • Tim Miller 32 posts 252 karma points
    Apr 15, 2020 @ 18:42
    Tim Miller
    0

    I have several sites running on GoDaddy using Plesk, so I can confirm that it will work. Try going to the ASP.NET Settings section for the website in your dashboard and set the CAS trust level to Full there. This may update more than what you are expecting in your Web.config. You may want to backup your Web.config prior to making the update and then diff the changes.

  • Anuj Singh 7 posts 87 karma points
    Apr 16, 2020 @ 02:26
    Anuj Singh
    0

    Dear Miller, Thanks for your reply. By default, CAS Trust Level is already set to Full. please see the image.enter image description here

    Still no luck :-(

  • Tim Miller 32 posts 252 karma points
    Apr 16, 2020 @ 18:25
    Tim Miller
    0

    So if you diff your Web.config against the default config for your version of Umbraco what are you seeing? Have you changed anything with the location sections?

  • Anuj Singh 7 posts 87 karma points
    Apr 17, 2020 @ 16:41
    Anuj Singh
    0

    Dear Miller, No, I didn't change anything except adding the <trust level="Full" /> inside <system.web> tag.

  • John Palmer 76 posts 201 karma points
    Apr 17, 2020 @ 08:01
    John Palmer
    0

    Hi Anuj,

    This is only permission issue. You just need to ask your hosting provider to give full permission for you. As I know that Godaddy doesn't support Full Trust, to run Umbraco site, you need to find hosting provider that support Full Trust.

  • Tim Miller 32 posts 252 karma points
    Apr 17, 2020 @ 15:54
    Tim Miller
    0

    I have multiple Umbraco sites running on GoDaddy. Both v7 and v8.

  • Anuj Singh 7 posts 87 karma points
    Apr 17, 2020 @ 16:43
    Anuj Singh
    0

    Dear Palmer, Thank you for the reply, I'll definitely talk with the hosting provider regarding this issue.

  • Anuj Singh 7 posts 87 karma points
    Apr 17, 2020 @ 16:45
    Anuj Singh
    0

    Dear Miller, Again thanks for suggesting me regarding the same, I'll recheck the permission settings and talk with the hosting provider if the problem remains the same.

  • Luqman 6 posts 86 karma points
    Sep 04, 2020 @ 05:35
    Luqman
    0

    I am also having the same issue. My site is developed in Latest Umbraco version. Website is running fine on local machine and after publishing in bigrock.in premium hosting i've contacted the team and asked to give full trust. They provided it and after that also the issue persists.

    My domain registration is in GoDaddy.. Is that a problem?

Please Sign in or register to post replies

Write your reply to:

Draft