Reportviewer10.0 an error occurred during local report processing. Failed to load expres in Windows Authentication Mode

Source: Internet
Author: User
ArticleDirectory
    • Localreport. setbasepermissionsforsandboxappdomain Method
 
An error occurred during local report processing. Failed to load expression host assembly. Details: RequestForThe permission of Type'System. Security. permissions. securitypermission, mscorlib, version = 4.0.0.0, culture = neutral, publickeytoken = b77a5c561934e0

Solution: Set permissions for the localreport of reportviewer:

 
VaR reportinstance =NewLocalreport (); reportinstance. setbasepermissionsforsandboxappdomain (NewPermissionset (permissionstate. Unrestricted ));

I don't really understand why. I do understand that the report is being granted permissions it can't get from WIF, but I don't understand which permissions those are or why it needs them. so, my answer "gives a man a fish," but can someone else "Teach a man to fish" by explaining the deeper issue?

Localreport. setbasepermissionsforsandboxappdomain Method

The newly added method for vs2010. Use the provided permission set to set sandbox applicationsProgramThe basic permissions of the domain.

The basic permissions in the sandbox application domain are applied to customCodeCalculates the Assembly and report expression. Note that this method replaces all existing basic permission sets with the provided permission sets. You shall ensure that the provided permission set includesExecutionPermission. Otherwise, no custom code assembly can be executed and no expressions can be computed.

If you change the permission, make sure that you cannot use the localreport object to access any untrusted report definition. In. NET Framework 3.5 (or in. NET Framework 4 with legacysecuritypolicy enabled), you must explicitly call the executereportinsandboxappdomain method to switch to the sandbox application domain mode.

Http://msdn.microsoft.com/zh-cn/library/microsoft.reporting.webforms.localreport.aspx

Http://stackoverflow.com/questions/4794968/reporting-services-localreport-and-wif

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.