More in this section

Forums / Security / Security Exception

Security Exception

2 posts, 0 answered
  1. Randy Bauer
    Randy Bauer avatar
    67 posts
    25 Sep 2009
    18 Nov 2009
    Link to this post
    I am getting the following error and I believe it is related to the Medium Trust Security Issue.  I have done some research, but I would like to understand exactly what I need to do to resolve this.

    My site contains a Home page, Blog Page, and two custom pages - Create Blog Post and Update Blog Post.  Both the custom pages have my own user defined controls that use the radEditor.  The users can create a blog post and update it.  They can also upload images to the posting.

    Here are some initial questions?

    1 - I need to make this a secure site.  Will this work?
    2 - Will my users be able to use my user control to create and update blog posts?
    3 - Will my users be able to upload images to via the radEditor?
    4 - Where do you actually set the trust level to medium?  One blog mentions doing this before updating the web config with other changes.
    5 - Are there hosting providers that allow for full trust?  I'm thinking that discountasp might, but do they offer SSL?

    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.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) +0  
       System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +64  
       System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +58  
       System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +65  
       System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +342  
       System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +52  
    Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082  
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    18 Nov 2009
    Link to this post
    Hi Randy Bauer,

    The problem comes from the security trust level that is set by your host. Most probably you are trying to run the website in full trust since your host supports Medium trust. This post describes how to configure your website in Medium trust and which features you have to disable.

    A good host is which supports full trust.

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered