Security Exception

3 posts, 0 answers
  1. Stig-Arild Martinsen
    Stig-Arild Martinsen avatar
    4 posts
    Member since:
    Sep 2009

    Posted 10 Nov 2009 Link to this post

    I've followed the "Getting started" example in the documentation for the RadUpload component but when I try to access the RadUploadHandler.ashx I get the following error message: System.Security.SecurityException: "Request for the permission of type 'System.Web.AspNetHostingPermission .....  failed".

    I'm testing this on a windows 7 / IIS 7 configuration.

    Any suggestions to why I get this exception?

    Edit: I've now tested the code on a Vista machine with success. Seems to be a windows 7 issue.
  2. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 11 Nov 2009 Link to this post

    Hello Martinsen,

    Thank you for reporting the issue.

    Actually the problem is due to the default settings of the IIS in Windows 7. Below you can find both the  explanation and the solution:
    • 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.Web.AspNetHostingPermission,...
    • Cause: Microsoft changed the default setting of the Load User Profile setting of the application pools in Windows 7 and Windows 2008 (the old was True, in IIS7.5 it is False).
    • Suggested solution: Open the Advanced Settings of the Application Pool and set the Load User Profile property to True.

    We hope this information will help you.

    Best wishes,
    Ivan
    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.
  3. Stig-Arild Martinsen
    Stig-Arild Martinsen avatar
    4 posts
    Member since:
    Sep 2009

    Posted 11 Nov 2009 Link to this post

    That solved the issue. Thanks!

    Stig
Back to Top