Re: Security Exception in CE 6.1

  •  03-06-2013, 1:20 PM

    Re: Security Exception in CE 6.1

    I came across this old post while researching another Code Access Security exception with CE 6.1 on Medium Trust that has recently arisen and previously did not occur. The site in question was deployed several years ago and worked correctly. Neither the application nor CE has been upgraded since. At some point, possibly due to an operating system upgrade, the editor has stopped working. I have pasted the error stack trace below.

     

    Has this issue been encountered before, and is there a fix for it?

     

    Paul Taylor 

     

    Details:
    Application: mscorlib
    System.MethodAccessException: System.RuntimeType.get_Assembly() ---> System.Security.SecurityException: Request failed.
       at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
       at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
       at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
       at System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh)
       at System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh)
       at System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet)
       at System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet)
       at System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext)
       at System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant)
    The action that failed was:
    Demand
    The type of the first permission that failed was:
    System.Security.PermissionSet
       --- End of inner exception stack trace ---
       at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
       at CuteEditor.Editor.a.a.e.a.a.a()
       at CuteEditor.Editor.a.a.a..ctor(a manager)
       at CuteEditor.Editor.a.a..ctor(Editor cuteEditor)
       at CuteEditor.Editor..ctor()
       at ASP.backoffice_contenteditor_aspx.__BuildControleditContent() in C:\inetpub\wwwroot\xxx\xxx\ContentEditor.aspx:line 62
       at ASP.backoffice_contenteditor_aspx.__BuildControlMain(Control __ctrl) in C:\inetpub\wwwroot\xxx\xxx\ContentEditor.aspx:line 7
       at System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container)
       at ASP.backoffice_backoffice_master.__BuildControlphContent() in C:\inetpub\wwwroot\xxx\xxx\BackOffice.master:line 43
       at ASP.backoffice_backoffice_master.__BuildControlForm1() in C:\inetpub\wwwroot\xxx\xxx\BackOffice.master:line 10
       at ASP.backoffice_backoffice_master.__BuildControlTree(backoffice_backoffice_master __ctrl) in C:\inetpub\wwwroot\xxx\xxx\BackOffice.master:line 1
       at ASP.backoffice_backoffice_master.FrameworkInitialize()
       at System.Web.UI.UserControl.InitializeAsUserControlInternal()
       at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)
       at System.Web.UI.Page.get_Master()
       at System.Web.UI.Page.ApplyMasterPage()
       at System.Web.UI.Page.PerformPreInit()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
       at System.Web.UI.Page.ProcessRequest()
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
       at System.Web.UI.Page.ProcessRequest(HttpContext context)
       at ASP.backoffice_contenteditor_aspx.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    http://localhost/xxx/xxx/ContentEditor.aspx?pid=1
    Void PerformSecurityCheck(System.Object, System.RuntimeMethodHandle, IntPtr, UInt32)
     


    Paul Taylor
    Dotcom Software Solutions
View Complete Thread