This is a migrated thread and some comments may be shown as answers.

Security Exception

2 Answers 69 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Stig-Arild Martinsen
Top achievements
Rank 1
Stig-Arild Martinsen asked on 10 Nov 2009, 08:25 AM
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 Answers, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 11 Nov 2009, 10:10 AM
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.
0
Stig-Arild Martinsen
Top achievements
Rank 1
answered on 11 Nov 2009, 03:01 PM
That solved the issue. Thanks!

Stig
Tags
Upload
Asked by
Stig-Arild Martinsen
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Stig-Arild Martinsen
Top achievements
Rank 1
Share this question
or