The Value expression for the query parameter contains an error : Request for the permission of type System.Security.Permissions.SecurityPermission failed.
Quick workaround to address this issue is by setting up permission on local report like below.
// Default.aspx.cs ... using System.Security; using System.Security.Permissions; namespace MyProj.Web.Reports { protected void Page_Load(object sender, EventArgs e) { if(!Page.IsPostBack) { ... ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/RDLC/Report1.rdlc"); ReportViewer1.LocalReport.SetBasePermissionsForSandboxAppDomain( new PermissionSet(PermissionState.Unrestricted)); ReportViewer1.LocalReport.Refresh(); } } }
No comments:
Post a Comment