Pages

Saturday, March 31, 2012

Umbraco 4.7 Insert Macro Security Exception

After publishing Umbraco 4.7 on a shared host, I was not able to inset macro in Tiny Editor.
The Error was something like this:

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:



[No relevant source lines]
Source File: App_Web_insertmacro.aspx.43b758d9.ef1yo35r.0.cs    Line: 0

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.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.Net.ServicePointManager.set_ServerCertificateValidationCallback(RemoteCertificateValidationCallback value) +54    umbraco.macro.MacroContentByHttp(Int32 PageID, Guid PageVersion, Hashtable attributes) +899    umbraco.presentation.tinymce3.insertMacro.renderMacro_Click(Object sender, EventArgs e) +1031    System.EventHandler.Invoke(Object sender, EventArgs e) +0    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431    System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253    System.Web.UI.Page.ProcessRequest() +78    System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21    System.Web.UI.Page.ProcessRequest(HttpContext context) +49    ASP.umbraco_plugins_tinymce3_insertmacro_aspx.ProcessRequest(HttpContext context) in App_Web_insertmacro.aspx.43b758d9.ef1yo35r.0.cs:0    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

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


This error can be eliminated by turning Off  "Render Content in Editor" in Macro Properties.