开发者

Custom Code access in a SQL Server report

This is my first post to this forum.

I have a SQL Server report that I have developed some custom code to return some data that is calculated through another dll (The calculation is extensive so I didn't want to re-create it).

I 've referenced the code in开发者_开发技巧 the report and I'm able to call the method that returns the data on my local machine, however when I transfer the dll and the report to the reporting server I get the following message:

"Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

I've tried creating a webservice, but the call failed just the same. From what I understand the rssrvpolicy.config on the report server requires an entry to give the dll permissions to execute. I have done this by adding the following entries with no luck:

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" >
                <IMembershipCondition class="UrlMembershipCondition" version="1" Url="d:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\PerfCalcLib.dll" />
              </CodeGroup>
<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" >
                <IMembershipCondition class="UrlMembershipCondition" version="1" Url="d:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin\PerfCalcLibWrapper.dll" />
              </CodeGroup>

Any ideas?

Thanks.


Just a thought. Did you try signing your assembly and deploying it to the GAC?


You can find resource at this http://msdn.microsoft.com/en-us/library/ms153561.aspx enough to get you started.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜