Friday, February 17, 2012

Custom Assembly deserialization issue

I see a lot of people are having the same issue when deploying to the report
server, even though things are running fine in design mode on their local
machines. I know that you need to copy all assemblies referenced to
/80/Tools/Report Designer/ and /MSSQL/Reporting Services/ReportServe/bin/ as
well as update rspreviewpolicy.config and rssrvpolicy.config files with
something resembling the following:
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="Custom_Code_Group"
Description="Allows for custom code execution in Reporting Services">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:/Program Files/Microsoft SQL Server/80/Tools/Report Designer/*"/>
</CodeGroup>
However, when I try to run the report in the preview utility or on the
server, I am presented with:
<i>Request for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=[PublicKeyToken]
failed.</i>
In the preview tab in the designer, the referenced assemblies are properly
deserializing my serialized object being returned by the query but since
there's this security issue when running the report elsewhere, I am having no
such luck. What am I doing wrong?It is also worth mentioning that the other error I get sporadically without
rhyme or reason is:
The value expression for the textbox â'textboxâ' contains an error: Cannot
find the assembly AssemblyName, Version=1.0.2120.25649, Culture=neutral,
PublicKeyToken=null.
This appears and disappears as I close and reopen Visual Studio as well as
rebuild my reporting project.|||Hi Keenan,
As you are doing the mermership of the assembly through the url and not the
strong name of the assembly maybe this is your case... in your server, the
assemblies are located exacly at: C:/Program Files/Microsoft SQL
Server/80/Tools/Report Designer/ ? or maybe it's in a different drive? if
they are not located in the same place you would have to change the url or
try with a membership with the strong name of the assembly
"Keenan Chadwick" <KeenanChadwick@.discussions.microsoft.com> wrote in
message news:D9C0CF29-9C02-45E9-AC79-5CBE3505173D@.microsoft.com...
> I see a lot of people are having the same issue when deploying to the
report
> server, even though things are running fine in design mode on their local
> machines. I know that you need to copy all assemblies referenced to
> /80/Tools/Report Designer/ and /MSSQL/Reporting Services/ReportServe/bin/
as
> well as update rspreviewpolicy.config and rssrvpolicy.config files with
> something resembling the following:
> <CodeGroup
> class="UnionCodeGroup"
> version="1"
> PermissionSetName="FullTrust"
> Name="Custom_Code_Group"
> Description="Allows for custom code execution in Reporting Services">
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
> Url="C:/Program Files/Microsoft SQL Server/80/Tools/Report Designer/*"/>
> </CodeGroup>
> However, when I try to run the report in the preview utility or on the
> server, I am presented with:
> <i>Request for the permission of type
> System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=[PublicKeyToken]
> failed.</i>
> In the preview tab in the designer, the referenced assemblies are properly
> deserializing my serialized object being returned by the query but since
> there's this security issue when running the report elsewhere, I am having
no
> such luck. What am I doing wrong?|||According to Microsoft, there is no need to have a strong-named assembly when
doing custom code. The URL references the exact spot on the server (from the
server's point of view, of course) where the assemblies reside. Nothing
works. I've tried strong-naming my assemblies and that caused a huge error
even in the design preview, so I have no idea at this point.
I am pretty sure there is some way to get my assemblies to run, since they
work in the design preview mode which runs everything with full permission.
Microsoft's support suggestion to me was really a question asking me to wait
for the 2005 suite of everything.

No comments:

Post a Comment