Security Exception only in Hosting server

4 posts, 0 answers
  1. Nimesha
    Nimesha avatar
    8 posts
    Member since:
    May 2011

    Posted 03 Jun 2011 Link to this post

    I am using telerik v2010.2.713.40. 

    The site runs with no errors locally, but when deployed in the hosting server I get the below error. The thing is, the error disappears when the page gets refreshed and works fine thereafter. Then again randomly the error will appear, and refreshing the page will do the trick again. The hosting company confirmed that they run the site on Medium trust environment, so I had updated the pages to work on a Medium Trust environment (inheriting from  System.Web.UI.Page, Telerik.Web.UI.IRadAjaxPage and overriding the rendering methods ). Some of other functions does not work as desired , and I think this might be the reason for it. Any help to sort this out will b highly appreciated. Thanks.

    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: 

    Line 6:  </asp:Content>
    Line 7:  <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    Line 8:      <telerik:RadScriptManager ID="ScriptManager" runat="server" />
    Line 9:      <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    Line 10:         <script type="text/javascript">

    Source File: d:\inetpub\vhosts\xyz.com.au\httpsdocs\ClientDashBoard.aspx    Line: 

    Stack Trace: 

    [SecurityException: Request failed.]
       System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +168
       System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
       System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +278
       System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, RuntimeAssembly asm, SecurityAction action) +70
       System.RuntimeMethodHandle.CheckLinktimeDemands(IRuntimeMethodInfo method, RuntimeModule module, Boolean isDecoratedTargetSecurityTransparent) +0
       System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +482
       System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
       System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
       System.Web.UI.AssemblyCache.GetAjaxFrameworkAssemblyAttribute(Assembly assembly) +62
       System.Web.UI.ScriptManager.get_DefaultAjaxFrameworkAssembly() +272
       System.Web.UI.ScriptManager..ctor() +11
       Telerik.Web.UI.RadScriptManager..ctor() +15
       ASP.clientdashboard_aspx.__BuildControlScriptManager() in d:\inetpub\vhosts\fetchpetcompany.com.au\httpsdocs\ClientDashBoard.aspx:8
       ASP.clientdashboard_aspx.__BuildControlContent2(Control __ctrl) in d:\inetpub\vhosts\fetchpetcompany.com.au\httpsdocs\ClientDashBoard.aspx:7
       System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
       System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +87
       ASP.clientmaster_master.__BuildControlContentPlaceHolder1() in d:\inetpub\vhosts\fetchpetcompany.com.au\httpsdocs\ClientMaster.master:65
       ASP.clientmaster_master.__BuildControlform1() in d:\inetpub\vhosts\fetchpetcompany.com.au\httpsdocs\ClientMaster.master:13
       ASP.clientmaster_master.__BuildControlTree(clientmaster_master __ctrl) in d:\inetpub\vhosts\fetchpetcompany.com.au\httpsdocs\ClientMaster.master:1
       ASP.clientmaster_master.FrameworkInitialize() in App_Web_clientmaster.master.cdcab7d2.07nip1fo.0.cs:0
       System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
       System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8836530
       System.Web.UI.Page.get_Master() +54
       System.Web.UI.Page.ApplyMasterPage() +15
       System.Web.UI.Page.PerformPreInit() +45
       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.clientdashboard_aspx.ProcessRequest(HttpContext context) in App_Web_clientdashboard.aspx.cdcab7d2.trsd0rpx.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.1




  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Jun 2011 Link to this post

    Hello Nimesha,

    I believe that the following forum thread will be of help:
    http://www.telerik.com/community/forums/aspnet/general-discussions/description-the-application-attempted-to-perform-an-operation-not-allowed-by-the-security-policy-to-grant-this-application-the-required-permission-ple.aspx


    Regards,
    Georgi Tunev
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Tyree
    Tyree avatar
    105 posts
    Member since:
    Dec 2006

    Posted 04 Feb 2013 Link to this post

    Did you ever get this cleared up? I am experiencing the exact same symptoms.
  4. Nimesha
    Nimesha avatar
    8 posts
    Member since:
    May 2011

    Posted 04 Feb 2013 Link to this post

    Hi Tyree,

    Unfortunately, the answer is No. I could not resolve it on the same hosting provider. I moved to another hosting provider (I think they have less restrictions on security so it resolved my issue) and the issue was not replicating in their hosting space. 

    Hope you will find a solution to your issue. I know it is quite frustrating :).

    Regards,
    Nimesha


Back to Top