Copied to clipboard

Flag this post as spam?

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

  • Peter 24 posts 102 karma points
    Apr 02, 2012 @ 11:08

    Umbraco 5: Security Exception

    I have uploaded the files to the server (shared hosting from Winhost) - but when accessing the site I get the below error.  Any idea what is wrong?

    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.FileIOPermission, mscorlib, Version=, 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.FileIOPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
       System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
       System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) +31
       System.Security.CodeAccessPermission.Demand() +46
       System.Reflection.RuntimeAssembly.VerifyCodeBaseDiscovery(String codeBase) +118
       System.Reflection.RuntimeAssembly.GetName(Boolean copiedName) +69
       System.Reflection.Assembly.GetName() +12
       Umbraco.Framework.<>c__DisplayClass5.<GetAllAssemblies>b__1(Assembly a) +14
       System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +153
       Umbraco.Framework.TypeFinder.<GetAllAssemblies>b__0(AssemblyName assemblyName) +74
       System.Linq.<>c__DisplayClass12`3.<CombineSelectors>b__11(TSource x) +32
       System.Linq.WhereSelectListIterator`2.MoveNext() +110
       System.Linq.WhereEnumerableIterator`1.MoveNext() +87
       System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +327
       System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
       Umbraco.Framework.TypeFinder.GetAllAssemblies() +662
       Umbraco.Framework.TypeFinder.GetBinFolderAssemblies() +14
       Umbraco.Framework.TypeFinder.GetFilteredBinFolderAssemblies(IEnumerable`1 excludeFromResults) +83
       Umbraco.Cms.Web.DependencyManagement.UmbracoComponentRegistrar..ctor() +121
       Umbraco.Cms.Web.DependencyManagement.DemandBuilders.UmbracoContainerBuilder`1..ctor(TWebApp httpApp) +81
       Umbraco.Cms.Web.System.Boot.BootManager..ctor(HttpApplication app) +255
       Umbraco.Cms.Web.UmbracoWebApplication.CreateBootManager() +26
       Umbraco.Cms.Web.UmbracoWebApplication.Start() +247
       Umbraco.Cms.Web.UI.MvcApplication.Application_Start() +137

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


  • Peter 24 posts 102 karma points
    Apr 03, 2012 @ 17:25

    I solved the problem by setting <trust level="Full"/> in web.config

  • Grant Thomas 291 posts 324 karma points
    Apr 03, 2012 @ 17:30
    Grant Thomas

    Peter, glad you got it working, though running in a full trust environment really wouldn't be my recommendation.

    The U5 has a permissions checker as part of the installation which can be invoked by manually browsing to the path where it resides - I don't have a U5 instance here right now to check, but if you rummage around under the 'Install' directories (just do a search for those if needs be) you should be able to locate it. I'm not even entirely sure what it will tell you if your permissions fail (or, 'when', considering we know they're wrong when not in full trust), but it should hopefully give some useful indication as to what exactly is restricted, meaning you can ammend the permissions for that object directly based on the requirements of such.

Please Sign in or register to post replies

Write your reply to: