I wrote a custom data processing extension for reporting services in
 SQL Server 2005. The extension works in preview mode, but when viewing
 it from the report server I get the error:
 --
 An error has occurred during report processing. (rsProcessingAborted)
 Cannot create command for data source 'MeridiumDataSource'.
 (rsErrorCreatingCommand)
 That assembly does not allow partially trusted callers.
 --
 I have put the correct codeblock tags in rssrvpolicy.config, right
 after the codeblock with Url="$CodeGen$/*" as I'm supposed to:
 --
 <CodeGroup
 class="UnionCodeGroup"
 version="1"
 PermissionSetName="FullTrust"
 Name="MeridiumCodeGroup"
 Description="Code group for my data processing extension">
 <IMembershipCondition
 class="UrlMembershipCondition"
 version="1"
 Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting
 Services\ReportServer\bin\MeridiumDataExtension.dll"
 />
 </CodeGroup>
 --
 I have some 3rd party assemblies that my DPE references; I also put a
 codeblock for them in rssrvpolicy.config:
 --
 <CodeGroup
 class="UnionCodeGroup"
 version="3.2.0.148"
 PermissionSetName="FullTrust"
 Name="MeridiumCoreCodeGroup"
 Description="This code group grants Meridium core code full
 trust. ">
 <IMembershipCondition
 class="StrongNameMembershipCondition"
 version="1"
 PublicKeyBlob="[public key]"
 />
 </CodeGroup>
 --
 I also put the followinig line in my AssemblyInfo.cs file:
 --
 [assembly: AllowPartiallyTrustedCallers]
 --
 None of these things changed the error. I also recently tried using
 mscorcfg.msc to create a code group giving everything in the bin folder
 (including all of my DLL's), and then I copied that codegroup to the RS
 config file. This failed to change anything as well. Any help would be
 greatly appreciated!Hi Ryan.
I have worked a lot with extensions and have had a lot of security issues.
I think the easiest way to find out which assembly needs permissions is to
debug. Step through you code and when a unthrusted method is called you will
get an exception.
Your third party assemblies might call something that need to be thrusted?
Kind regards
Martin Bring (Sogeti AB)
********************
"Ryan" wrote:
> I wrote a custom data processing extension for reporting services in
> SQL Server 2005. The extension works in preview mode, but when viewing
> it from the report server I get the error:
> --
> An error has occurred during report processing. (rsProcessingAborted)
> Cannot create command for data source 'MeridiumDataSource'.
> (rsErrorCreatingCommand)
> That assembly does not allow partially trusted callers.
> --
> I have put the correct codeblock tags in rssrvpolicy.config, right
> after the codeblock with Url="$CodeGen$/*" as I'm supposed to:
> --
> <CodeGroup
> class="UnionCodeGroup"
> version="1"
> PermissionSetName="FullTrust"
> Name="MeridiumCodeGroup"
> Description="Code group for my data processing extension">
> <IMembershipCondition
> class="UrlMembershipCondition"
> version="1"
> Url="C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting
> Services\ReportServer\bin\MeridiumDataExtension.dll"
> />
> </CodeGroup>
> --
> I have some 3rd party assemblies that my DPE references; I also put a
> codeblock for them in rssrvpolicy.config:
> --
> <CodeGroup
> class="UnionCodeGroup"
> version="3.2.0.148"
> PermissionSetName="FullTrust"
> Name="MeridiumCoreCodeGroup"
> Description="This code group grants Meridium core code full
> trust. ">
> <IMembershipCondition
> class="StrongNameMembershipCondition"
> version="1"
> PublicKeyBlob="[public key]"
> />
> </CodeGroup>
> --
> I also put the followinig line in my AssemblyInfo.cs file:
> --
> [assembly: AllowPartiallyTrustedCallers]
> --
> None of these things changed the error. I also recently tried using
> mscorcfg.msc to create a code group giving everything in the bin folder
> (including all of my DLL's), and then I copied that codegroup to the RS
> config file. This failed to change anything as well. Any help would be
> greatly appreciated!
>
No comments:
Post a Comment