ReportViewer Control- System.Security.SecurityException:该程序集不允许部分信任的调用者

时间:2009-08-24 20:52:38

标签: asp.net reportviewer

我在ASP.NET网页上使用ReportViewer控件,当部署到托管站点时,我得到以下异常:

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: That assembly does not allow partially trusted callers.

我意识到这是因为我现在在中等信任模式下运行而不是在开发时完全信任。

我很难找到允许ReportViewer控件在中型信任环境中运行的解决方案。

1 个答案:

答案 0 :(得分:0)

当我遇到这个问题时,我找不到合适的答案。最后,我转移到允许ReportViewer控件(AKA完全信任)的主机。这适用于本地模式报告....如果您在报表服务器上运行,那么中等信任应该按照以下方式运行:

http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/23c37d41-5cb7-4579-86c3-27460e654b65

很抱歉。我知道这不是你想听到的。

相关问题