Showing posts with label copied. Show all posts
Showing posts with label copied. Show all posts

Sunday, February 19, 2012

Custom Assembly not invoked in Report Manager

Hi,

I developed a custom assembly( in C# ) which references satellite assemblies. In order to refer this assembly in one of my reports, I copied the assembly and its dependencies in the Report Server bin folder and Report Designer folder. Also I inserted CodeGroup tag for the custom asembly in both rssrvpolicy.config and rspreviewpolicy.config with Full Trust.

Now, the report works perfectly when I preview it through Visual Studio.NET IDE. But when I deploy the same report to the report manager, it is not working. It does not give any error, but the textboxes whose expression invoke the method in the custom assembly, have empty values. So, the text boxes show up empty.

Any idea where am going wrong?

Thanks,

Rama

You also need to add code groups for all non-MS assemblies referenced by your custom assembly.
Do not forget to assert permissions (or fulltrust) in your custom assembly

|||

Hi,

As I mentioned in my post, I have added the code group for the custom assembly and given full trust permission for it. I will explain more about the custom assembly.

The custom assembly just reads strings from satellite assemblies( based on the current culture ) and assigns it as value to a textbox in the report. When I preview the report from the Visual Studio.NET IDE , it works perfectly fine i.e. it reads the strings from the satellite assembly linked with the user's culture.

When I deploy the report to the report manager, the custom assembly returns the following exception:

System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "ReportStrings.resources" was correctly embedded or linked into assembly "ReportLocalization".
baseName: ReportStrings locationInfo: <null> resource file name: ReportStrings.resources assembly: ReportLocalization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
at Microsoft.DCMReports.ReportLocalization.ResourceHelper.GetResourceValue(String resourceKey)
at Microsoft.DCMReports.ReportLocalization.Reports.GetValue(String culture, String key)

I have copied the custom assembly to the Report Server bin folder and copied the satellite assemblies onto their specific culture folders i.e. satellite assemblies linked to the custom assembly with culture "de", will be copied to the "de" folder and so on.

Should I do something for this satellite assembly too? Please give your suggestions.

Thanks,

Rama

Friday, February 17, 2012

custom assemblies problem

I have built a custom assembly, I copied it to the right folders and wrote
some code to call the component.
It works fine in preview mode, but when I deploy the report to another
server I get the error:
"error while loading code module 'x', version='x' ..."
I feel I tried everything, copying the dll myself to the server's
reportserver\bin folder, giving read & execute permissions, creating the xml
nodes in the RSReportServer.config on the server etc.
Always that error.
Is there some description on what to do if you deploy your reports with
custom assemblies to another server?This is a multi-part message in MIME format.
--=_NextPart_000_005C_01C5078D.1745CA00
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
might be a code access security problem
to diagnose (do not do this on a production server) please find =rssrvpolicy.config file in ReportServer folder and modify the following:
old:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"Nothing">
new:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"FullTrust">
Restart iis and see if it runs the report, let me know the results. If =it runs - it's a security problem, I will let you know further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; Xml; =SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...
> I have built a custom assembly, I copied it to the right folders and =wrote
> some code to call the component.
> It works fine in preview mode, but when I deploy the report to another
> server I get the error:
> "error while loading code module 'x', version=3D'x' ..."
> > I feel I tried everything, copying the dll myself to the server's
> reportserver\bin folder, giving read & execute permissions, creating =the xml
> nodes in the RSReportServer.config on the server etc.
> > Always that error.
> > Is there some description on what to do if you deploy your reports =with
> custom assemblies to another server?
> >
--=_NextPart_000_005C_01C5078D.1745CA00
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

might be a code access security problem
to diagnose (do not do this on a production server) =please find rssrvpolicy.config file in ReportServer folder and modify the following:
old:
&nbs=p; new:
&nbs=p;
Restart iis and see if it runs the report, let me =know the results. If it runs - it's a security problem, I will let you know =further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex MineevSoftware Design Engineer. =Report expressions; Code Access Security; Xml; SQE.
This posting is provided "AS IS" with no warranties, =and confers no rights
"Serv=E9 La" wrote in =message news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...> I have built a custom =assembly, I copied it to the right folders and wrote> some code to call the component.> It works fine in preview mode, but when I deploy the =report to another> server I get the error:> "error while loading =code module 'x', version=3D'x' ..."> > I feel I tried =everything, copying the dll myself to the server's> reportserver\bin folder, giving =read & execute permissions, creating the xml> nodes in the RSReportServer.config on the server etc.> > Always that error.> > Is there some description on what to do if you =deploy your reports with> custom assemblies to another server?> =>

--=_NextPart_000_005C_01C5078D.1745CA00--|||This is a multi-part message in MIME format.
--=_NextPart_000_0013_01C50905.46797AA0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Thank you for answering. The problem was solved, it was a stupid mistake =of mine.
The good news is that the FullTrust setting did help me later when I =needed to load assemblies from report code :)
"Alexandre Mineev [MSFT]" <almineev@.microsoft.com> schreef in bericht =news:eAOfmA9BFHA.1260@.TK2MSFTNGP12.phx.gbl...
might be a code access security problem
to diagnose (do not do this on a production server) please find =rssrvpolicy.config file in ReportServer folder and modify the following:
old:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"Nothing">
new:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"FullTrust">
Restart iis and see if it runs the report, let me know the results. If =it runs - it's a security problem, I will let you know further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; =Xml; SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...
> I have built a custom assembly, I copied it to the right folders and =wrote
> some code to call the component.
> It works fine in preview mode, but when I deploy the report to =another
> server I get the error:
> "error while loading code module 'x', version=3D'x' ..."
> > I feel I tried everything, copying the dll myself to the server's
> reportserver\bin folder, giving read & execute permissions, creating =the xml
> nodes in the RSReportServer.config on the server etc.
> > Always that error.
> > Is there some description on what to do if you deploy your reports =with
> custom assemblies to another server?
> >
--=_NextPart_000_0013_01C50905.46797AA0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Thank you for answering. The problem =was solved, it was a stupid mistake of mine.
The good news is that the FullTrust =setting did help me later when I needed to load assemblies from report code :)
"Alexandre Mineev [MSFT]" =schreef in bericht news:eAOfmA9BFHA.1260=@.TK2MSFTNGP12.phx.gbl...
might be a code access security =problem
to diagnose (do not do this on a production =server) please find rssrvpolicy.config file in ReportServer folder and modify the following:
old:
&nbs=p; new:
&nbs=p;
Restart iis and see if it runs the report, let me =know the results. If it runs - it's a security problem, I will let you know =further steps.

! Please undo the change of =rssrvpolicy.config afterwards...!
-- Alex MineevSoftware Design =Engineer. Report expressions; Code Access Security; Xml; SQE.

This posting is provided "AS IS" with no =warranties, and confers no rights
"Serv=E9 La" wrote in =message news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...> I have built a custom =assembly, I copied it to the right folders and wrote> some code to call the = component.> It works fine in preview mode, but when I deploy =the report to another> server I get the error:> "error while =loading code module 'x', version=3D'x' ..."> > I feel I tried =everything, copying the dll myself to the server's> reportserver\bin =folder, giving read & execute permissions, creating the xml> nodes in the RSReportServer.config on the server etc.> > Always that error.> > Is there some description on what to do if you =deploy your reports with> custom assemblies to another server?> = >

--=_NextPart_000_0013_01C50905.46797AA0--|||This is a multi-part message in MIME format.
--=_NextPart_000_000F_01C50916.FB775740
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
Please do not use FullTrust in production environment. It ultimately =opens RS for attacks.
The use of FullTrust was needed for diagnostics only.
This article describe what needs to be done for custom assemblies if =they do not work by default: =http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/RSPROG=
/htm/rsp_prog_rdl_8mue.asp
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; Xml; =SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:uSURmzPCFHA.3492@.TK2MSFTNGP12.phx.gbl...
Thank you for answering. The problem was solved, it was a stupid =mistake of mine.
The good news is that the FullTrust setting did help me later when I =needed to load assemblies from report code :)
"Alexandre Mineev [MSFT]" <almineev@.microsoft.com> schreef in =bericht news:eAOfmA9BFHA.1260@.TK2MSFTNGP12.phx.gbl...
might be a code access security problem
to diagnose (do not do this on a production server) please find =rssrvpolicy.config file in ReportServer folder and modify the following:
old:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"Nothing">
new:
<CodeGroup class=3D"FirstMatchCodeGroup"
version=3D"1"
PermissionSetName=3D"FullTrust">
Restart iis and see if it runs the report, let me know the results. =If it runs - it's a security problem, I will let you know further steps.
! Please undo the change of rssrvpolicy.config afterwards...!
-- Alex Mineev
Software Design Engineer. Report expressions; Code Access Security; =Xml; SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" <blabla@.bestaatniet.nl> wrote in message =news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...
> I have built a custom assembly, I copied it to the right folders =and wrote
> some code to call the component.
> It works fine in preview mode, but when I deploy the report to =another
> server I get the error:
> "error while loading code module 'x', version=3D'x' ..."
> > I feel I tried everything, copying the dll myself to the server's
> reportserver\bin folder, giving read & execute permissions, =creating the xml
> nodes in the RSReportServer.config on the server etc.
> > Always that error.
> > Is there some description on what to do if you deploy your reports =with
> custom assemblies to another server?
> >
--=_NextPart_000_000F_01C50916.FB775740
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Please do not use FullTrust in production =environment. It ultimately opens RS for attacks.
The use of FullTrust was needed for diagnostics only.
This article describe what needs to be done for =custom assemblies if they do not work by default: http://msdn.microsoft.com/library/def=ault.asp?url=3D/library/en-us/RSPROG/htm/rsp_prog_rdl_8mue.asp=-- Alex MineevSoftware Design =Engineer. Report expressions; Code Access Security; Xml; SQE.
This posting is provided "AS IS" with no warranties, and confers no =rights
"Serv=E9 La" =wrote in message news:uSURmzPCFHA.3492=@.TK2MSFTNGP12.phx.gbl...
Thank you for answering. The problem =was solved, it was a stupid mistake of mine.
The good news is that the FullTrust =setting did help me later when I needed to load assemblies from report code :)


"Alexandre Mineev [MSFT]" =schreef in bericht news:eAOfmA9BFHA.1260=@.TK2MSFTNGP12.phx.gbl...
might be a code access security =problem
to diagnose (do not do this on a production =server) please find rssrvpolicy.config file in ReportServer folder and modify the following:
old:
&nbs=p; new:
&nbs=p;
Restart iis and see if it runs the report, let =me know the results. If it runs - it's a security problem, I will let you know =further steps.

! Please undo the change of =rssrvpolicy.config afterwards...!
-- Alex MineevSoftware Design =Engineer. Report expressions; Code Access Security; Xml; SQE.

This posting is provided "AS IS" with no =warranties, and confers no rights
"Serv=E9 La" wrote =in message news:OP9Oyq6BFHA.1004@.TK2MSFTNGP15.phx.gbl...> I have built a custom =assembly, I copied it to the right folders and wrote> some code to call =the component.> It works fine in preview mode, but when I deploy =the report to another> server I get the error:> "error =while loading code module 'x', version=3D'x' ..."> > I feel =I tried everything, copying the dll myself to the server's> =reportserver\bin folder, giving read & execute permissions, creating the =xml> nodes in the RSReportServer.config on the server etc.> => Always that error.> > Is there some description on =what to do if you deploy your reports with> custom assemblies to another = server?> > =

--=_NextPart_000_000F_01C50916.FB775740--