Hosting the Reporting REST Service in Medium Trust environment leads to a permission error.
Environment
Product | Progress® Telerik® Reporting REST Service |
Application Type | Web Application |
Report Viewer | HTML5 Report Viewer |
Error Message
Hosting with Medium Trust: "Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Cause
The Reporting REST Service is not designed to operate in Medium Trust environment.
Description
The error will be bubbled in the web viewer's preview window when the Reporting REST service is hosted in Medium Trust environment.
Solution
Separate the Reporting REST Service and host it in an environment with Full Trust- check How To: Self Host Telerik Reporting REST Web API and How To: Add Telerik Reporting REST Web API to Web Application(you can find the VS project template in the Reporting category of VS templates). This may require you to enable CORS for the service to let the HTML5 Viewer communicate with it.
Export reports programmatically without displaying them. Please check the Medium Trust Support article for more details, which rendering formats work.