最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

[转]Microsoft Dynamics AX 2012 Reporting extensions: Error System.Security.Permissions.EnvironmentPermission while running report

网络文摘 William 2271浏览 0评论

We run into issue that whenever we used a Microsoft Dynamics AX configuration file with a Reporting Services instance (as mentioned in here: http://technet.microsoft.com/en-us/library/hh389774.aspx) the following error was reported the first time a report was run after the restart of the SQL Reporting Services instance:

“The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed. (rsRuntimeErrorInExpression)”

Running the report for the second time, it renders without any error. The error is mostly seen with subsequent instances of Reporting Services because only then an Microsoft Dynamics AX configuration file (Microsoft.Dynamics.AX.ReportConfiguration.axc) is used but any Reporting Services instance that is set up to use an AX configuration file will throw this error.

The resolution we found was to use “FullTrust” permission set in place of  “Execute” for the “Report_Expressions_Default_Permissions” in the rssrvpolicy.config(C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer)

Existing configuration:

<CodeGroup
class=”UnionCodeGroup”
version=”1″
PermissionSetName=”Execution”
Name=”Report_Expressions_Default_Permissions”
Description=”This code group grants default permissions for code in report expressions and Code element. “>
[…]
</CodeGroup>

Replacement configuration:

<CodeGroup
class=”UnionCodeGroup”
version=”1″
PermissionSetName=”FullTrust”
Name=”Report_Expressions_Default_Permissions”
Description=”This code group grants default permissions for code in report expressions and Code element. “>[..]</CodeGroup>

–author:Jolanta Malkowska

原文地址:http://blogs.msdn.com/b/axsupport/archive/2012/02/02/microsoft-dynamics-ax-2012-reporting-extensions-error-system-security-permissions-environmentpermission-while-running-report.aspx

转载请注明:ww12345678 的部落格 | AX Helper » [转]Microsoft Dynamics AX 2012 Reporting extensions: Error System.Security.Permissions.EnvironmentPermission while running report

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址