Showing posts with label assemblies. Show all posts
Showing posts with label assemblies. Show all posts

Thursday, March 22, 2012

Custom Task Deployment

Hello All,

We have developed some custom tasks which we currently deploy the standard way. That is, we install the custom task assemblies in the DTS\Tasks folder and we also install the assemblies in the GAC. Due to some deployment practices we are trying to implement we would like to be able to remove the assemblies from the GAC and install them in some other location. I have tried installing the assemblies in the DTS\Binn folder, but this does not appear to be working. When I drop the custom control flow tasks onto the package's control flow tab I get the "Cannot create a task with the name ..." error.

Is it possible to not have the custom task assemblies in the GAC? Are there any tricks to getting it to work?

FYI, our assemblies are signed. I'm not sure if that has anything to do with our troubles.

Thanks,

Rob

1234123412 wrote:

Hello All,

We have developed some custom tasks which we currently deploy the standard way. That is, we install the custom task assemblies in the DTS\Tasks folder and we also install the assemblies in the GAC. Due to some deployment practices we are trying to implement we would like to be able to remove the assemblies from the GAC and install them in some other location. I have tried installing the assemblies in the DTS\Binn folder, but this does not appear to be working. When I drop the custom control flow tasks onto the package's control flow tab I get the "Cannot create a task with the name ..." error.

Is it possible to not have the custom task assemblies in the GAC? Are there any tricks to getting it to work?

FYI, our assemblies are signed. I'm not sure if that has anything to do with our troubles.

Thanks,

Rob

Unfortunately (for you) they are required to be in the GAC.

-Jamie

|||

It makes sense (standard .Net assembly loader stuff), and as indicated in the post below , the assemblies can be loaded from the execution host directory as well. It is not documented, and probably not supported either. I know that the designer uses the DTS\ObjectType folders, so have you tried it in DTS\Task and DTS\Binn at the same time? If so and it still does not work, then why not try the supported/documented method ;) In theory the designer only requires the DLL in the DTS\Task folder, the GAC is used at runtime.

The only other reason for the error, is that the assembly you are trying to add, as stored in the toolbox "metadata" is no longer the assembly you actually have. Maybe clearing out the toolbox will help. If you changed the strong name, then you will have to fix up any packages and also sort out the toolbox.

Re: Custom SSIS Task Deployment - MSDN Forums
(http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=803910&SiteID=1)

Why not install them in the GAC as usual?

|||

Our issue is that we have several data access layer assemblies which are shared by our custom tasks and some web applications. The problem is that on several of our developer machines we are having build problems when building the web applications. We get error messages when we try to register the assemblies in the GAC. It has something to do with the ASP.Net worker process "locking" the assemblies even though the web application isn't running.

I haven't been able to get the custom tasks to work if they aren't in the GAC, but since the web application/GAC issue is just with the DAL assemblies it is really the DAL assemblies that we want to avoid putting in the GAC. I am able to put the DAL assemblies in the DTS\binn directory and keep the custom task assemblies in the GAC. This solves our problem.

Thanks for your repsonses.

Friday, February 24, 2012

Custom coding

I'm using the Report.References collection to link to some external
Assemblies (developed in C#). Also, I use the Report.Classes collection to
instantiate some classes defined in that assemblies. This works, as I'm
able to show a custom Windows form from the constructors of the instantiated
classes in report initialization time and to get simple values from some
properties. As this approach is extremately useful, I'd like to acquire
maximum flexibility being able to access from these classes to all the
properties of the Report via the corresponding namespaces as follows:
Microsoft.ReportingServices.ReportProcessing
Microsoft.ReportingServices.ReportRendering
As an example, I'd like to access to the Report object, to an existing
Matrix item, etc. I'm trying it this way:
///////////////////////////// C# in the Assembly:
namespace CustomAssembly
{
public class Class1
{
public int
GetRenderedColumnsCount(Microsoft.ReportingServices.ReportRendering.Report
p_Report)
{
return p_Report.Columns;
}
public int
GetMatrixColumnsCount(Microsoft.ReportingServices.ReportRendering.Matrix
p_Matrix)
{
return p_Matrix.Columns;
}
}
}
/////////////////////////////// Report:
First, I reference the Assemblies:
<CodeModules>
<CodeModule>CustomAssembly, Version=1.0.1719.22270, Culture=neutral,
PublicKeyToken=null</CodeModule>
</CodeModules>
Second, I instantiate the Classes:
<Classes>
<Class>
<ClassName>CustomAssembly.Class1</ClassName>
<InstanceName>class1</InstanceName>
</Class>
</Classes>
Last, I tried to use the following expressions in a TextBox.Value but none
of them work:
=Code.class1.GetRenderedColumnsCount(Report)
=Code.class1.GetRenderedColumnsCount(Code.Report)
=Code.class1.GetMatrixColumnsCount(matrix1)
=Code.class1.GetMatrixColumnsCount(Report.matrix1)
=Code.class1.GetMatrixColumnsCount(Report!matrix1)
=Code.class1.GetMatrixColumnsCount(Report("matrix1"))
I'm sure the construction works because I'm showing a MessageBox in the
constructor and other properties are returning the proper value to the
report.
Can anyone, please, tell me what am I doing wrong?Hi.
I had this problem and was able to solve it by following these instructions.
Copy your custom assembly from your build location to the report server bin
folder or the Report Designer folder. The default location of the bin folder
for the report server is C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\bin. The default location of the
Report Designer is C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer.
It should then work
Christina
"Al Santamaria" wrote:
> I'm using the Report.References collection to link to some external
> Assemblies (developed in C#). Also, I use the Report.Classes collection to
> instantiate some classes defined in that assemblies. This works, as I'm
> able to show a custom Windows form from the constructors of the instantiated
> classes in report initialization time and to get simple values from some
> properties. As this approach is extremately useful, I'd like to acquire
> maximum flexibility being able to access from these classes to all the
> properties of the Report via the corresponding namespaces as follows:
> Microsoft.ReportingServices.ReportProcessing
> Microsoft.ReportingServices.ReportRendering
> As an example, I'd like to access to the Report object, to an existing
> Matrix item, etc. I'm trying it this way:
> ///////////////////////////// C# in the Assembly:
> namespace CustomAssembly
> {
> public class Class1
> {
> public int
> GetRenderedColumnsCount(Microsoft.ReportingServices.ReportRendering.Report
> p_Report)
> {
> return p_Report.Columns;
> }
> public int
> GetMatrixColumnsCount(Microsoft.ReportingServices.ReportRendering.Matrix
> p_Matrix)
> {
> return p_Matrix.Columns;
> }
> }
> }
> /////////////////////////////// Report:
> First, I reference the Assemblies:
> <CodeModules>
> <CodeModule>CustomAssembly, Version=1.0.1719.22270, Culture=neutral,
> PublicKeyToken=null</CodeModule>
> </CodeModules>
> Second, I instantiate the Classes:
> <Classes>
> <Class>
> <ClassName>CustomAssembly.Class1</ClassName>
> <InstanceName>class1</InstanceName>
> </Class>
> </Classes>
> Last, I tried to use the following expressions in a TextBox.Value but none
> of them work:
> =Code.class1.GetRenderedColumnsCount(Report)
> =Code.class1.GetRenderedColumnsCount(Code.Report)
> =Code.class1.GetMatrixColumnsCount(matrix1)
> =Code.class1.GetMatrixColumnsCount(Report.matrix1)
> =Code.class1.GetMatrixColumnsCount(Report!matrix1)
> =Code.class1.GetMatrixColumnsCount(Report("matrix1"))
> I'm sure the construction works because I'm showing a MessageBox in the
> constructor and other properties are returning the proper value to the
> report.
> Can anyone, please, tell me what am I doing wrong?
>
>

Sunday, February 19, 2012

Custom assembly or DPE?

Hi im writting a new report engine, but i need to have some advice about when
is highly recommended Custom Assemblies or DPE?
Thanks1.- Create a DPE will help you if you require more than a plain stored
procedure.
2.- Custom Assembly will help you for granular items, for example: calculate
or agregate, mask for values per field.
The main differences apparte of the deployment stuff, is the scope, if you
want to address, the whole recordset use DPE or some fields use custom
assemblies.
Thanks
Jerry
--
Call webservices from SQL RS
http://www.rdlcomponents.com/DTE/Default.aspx
Call webservices from SQL Server 2000
http://www.rdlcomponents.com/EXSP/default.aspx
"Andrew" wrote:
> Hi im writting a new report engine, but i need to have some advice about when
> is highly recommended Custom Assemblies or DPE?
> Thanks
>

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 assembly

hello
after getting the first row of data using .net assemblies, the remaining
rows show #error.
any ideas?problem solved. error was in .net assembly.
"Peter Fuller" wrote:
> hello
> after getting the first row of data using .net assemblies, the remaining
> rows show #error.
> any ideas?|||here is another problem.
the report has 36 rows. when i change the select statement to have the top
1 then the data is correct.
when i remove the top 1 then some of the fields are incorrect. does report
server create separate instances of the .net assembly for each field?
"Peter Fuller" wrote:
> problem solved. error was in .net assembly.
> "Peter Fuller" wrote:
> > hello
> >
> > after getting the first row of data using .net assemblies, the remaining
> > rows show #error.
> >
> > any ideas?|||this is really weird
i hard code the value into the variable passed to the .net assembly. then
upon returning 4 rows, i expect to see the same data. however, the first row
is correct, the 2-4 rows are an incorrect number but identical.
any ideas out there?
"Peter Fuller" wrote:
> here is another problem.
> the report has 36 rows. when i change the select statement to have the top
> 1 then the data is correct.
> when i remove the top 1 then some of the fields are incorrect. does report
> server create separate instances of the .net assembly for each field?
> "Peter Fuller" wrote:
> > problem solved. error was in .net assembly.
> >
> > "Peter Fuller" wrote:
> >
> > > hello
> > >
> > > after getting the first row of data using .net assemblies, the remaining
> > > rows show #error.
> > >
> > > any ideas?

Custom Assemblies: Using same data source as in RS

Hi all,
most of all works like charm, but I'm thinking how to define database
data source for my custom assembly. The best option would be use same
datasource as is defined in RS, it should be in some way shared ?
Now I have defined it like:
connSql = New
SqlConnection("server=localhost;uid=foo;pwd=bar;database=MYDB")
It would be nice, if I change Data Source in RS, it will change also
in my assembly, but I'm not sure if it is possible. Also, next option
which comes to my mind is read CFG from external file...
Thanks for any idea
/branoBrano,
Are you implementing IDbConnection, IDbConnectionExtension? If you
are, you'll get all the datasource connection information, including
the User/PW defined in the report datasource.
I then have a constructor on my Command implementation that looks like
this:
public DsCommand(string aCmdText, DsConnectionWrapper aConnection)
{
mCommandText = aCmdText;
mConnection = aConnection;
}
I grab any pertinent Connection information I need down the road.
Andy Potter|||Hello Potter,
Wednesday, January 25, 2006, 2:30:37 PM, you wrote:
> Are you implementing IDbConnection, IDbConnectionExtension? If you
> are, you'll get all the datasource connection information, including
> the User/PW defined in the report datasource.
Thats good, I exatly need to do this. I dont know what is
IDbConnection.
> I then have a constructor on my Command implementation that looks like
> this:
> public DsCommand(string aCmdText, DsConnectionWrapper aConnection)
> {
> mCommandText = aCmdText;
> mConnection = aConnection;
> }
> I grab any pertinent Connection information I need down the road.
should you please send me some code with examples, or where I should
read about this ? I am really new to VB .NET (you are using C# as I
see, but thats nearly same now) and need more help.
Really thanks, good news is it is possible :)|||Look at Teo Lacehv's sample (do a google search). He implements the
IDbConnection and should give you a better idea of all the interfaces
you need to implement.
Andy Potter|||Hello Potter,
> Look at Teo Lacehv's sample (do a google search). He implements the
> IDbConnection and should give you a better idea of all the interfaces
> you need to implement.
Thanks, sure I will.

Custom Assemblies RS 2000

Hi,

I'm creating a report with 3 parameters. The first parameter will hold the user ID. In order to get this I need to write a function to find the NT login name of the user and then search in a SQL Server Table to find what the User ID is for that user.

This user ID will be required in around 15 or so reports so I suspect a custom assembly will suit the purpose rather than adding custom code to each report.

Can anybody tell me if this sort of thing achievable?

Thanks in advance,

Steve

Sure. You can take a look at the documentation on custom assemblies here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_rdl_6d0i.asp

Custom Assemblies Returning #Error on Production Server

To make a long story short.
I have a custom assembly which works fine on my development pc; however when
I deploy it to the production server, I get #error where my assembly is
supposed to return a value. My assembly on works on the production server
only if I turn off security with caspol.exe.
- Things I've done so far -
1. Copied my DLL to the bin folder of the production Report Server
2. Added a code group to the rssrvpolicy.config file with Full Trust for my
assembly.
3. Evaluted the assembly permission with .Net Configurator, which return
"unrestricted" on all levels.
Any help would be greatly appreciated at this point..Thanks in advance.I've noticed quite a few others having the same problem; so I'm sharing my
solution in hopes that it may help others.
Given what I tried in the previous post, the only thing I didn't do was
"Assert Permissions" within the code in my custom assembly. Even though your
assemly works in the designer; unless you "Assert Permissions", it will NOT
work when you deploy your solution to the production server environment.
Imports for my assembly:
Imports System.Data.SqlClient
Imports System.Security.Permissions
Below is the line of code I added to the assembly:
Dim pSQL As New
SqlClientPermission(System.Security.Permissions.PermissionState.Unrestricted)
pSQL.Assert()
Reference on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_rdl_0so6.asp
Hope this helps someone.
"stryder9" wrote:
> To make a long story short.
> I have a custom assembly which works fine on my development pc; however when
> I deploy it to the production server, I get #error where my assembly is
> supposed to return a value. My assembly on works on the production server
> only if I turn off security with caspol.exe.
> - Things I've done so far -
> 1. Copied my DLL to the bin folder of the production Report Server
> 2. Added a code group to the rssrvpolicy.config file with Full Trust for my
> assembly.
> 3. Evaluted the assembly permission with .Net Configurator, which return
> "unrestricted" on all levels.
> Any help would be greatly appreciated at this point..Thanks in advance.

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--

Custom assemblies in July CTP 2005

Hi,
I was just trying to test my new custom assemblies on 2005 CTP July
version (I think). The usual directories are not there. I looked up
the documentation and the directories the documentation told me to put
the custom assemblies in are also not there...
Does anyone know where I should put the dll for custom assemblies for
2005 July CTP?
Thanks
Peter
www.peternolan.comI highly recommend downloading the September CTP. Especially if you are
using Reporting Services.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Peter Nolan" <peter@.peternolan.com> wrote in message
news:1127598946.821023.209470@.f14g2000cwb.googlegroups.com...
> Hi,
> I was just trying to test my new custom assemblies on 2005 CTP July
> version (I think). The usual directories are not there. I looked up
> the documentation and the directories the documentation told me to put
> the custom assemblies in are also not there...
> Does anyone know where I should put the dll for custom assemblies for
> 2005 July CTP?
> Thanks
> Peter
> www.peternolan.com
>|||Regarding custom assemblies on RS 2005 - please check the updated online
documentation for RS 2005: http://msdn2.microsoft.com/en-us/library/ms225486
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:O4KuhwWwFHA.900@.TK2MSFTNGP11.phx.gbl...
>I highly recommend downloading the September CTP. Especially if you are
>using Reporting Services.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Peter Nolan" <peter@.peternolan.com> wrote in message
> news:1127598946.821023.209470@.f14g2000cwb.googlegroups.com...
>> Hi,
>> I was just trying to test my new custom assemblies on 2005 CTP July
>> version (I think). The usual directories are not there. I looked up
>> the documentation and the directories the documentation told me to put
>> the custom assemblies in are also not there...
>> Does anyone know where I should put the dll for custom assemblies for
>> 2005 July CTP?
>> Thanks
>> Peter
>> www.peternolan.com
>|||Hi Bruce,
thanks...I got a note from dundas on their new beta and it being
recommended on the september CTP.....but I am travelling again so I
will fetch all the 'new stuff' next time I on my own dime...
Thanks
Peter|||Hi Robert,
I followed the documentation you pointed to and copied my custom
assembly as put new code groups into the config files as specified..I
still get the message 'The application for BI4ALL.rptproj is not
installed' when I try to open up my visual studio project.....I have
an old version and the only difference is the custom assembly (I
believe).
Do you (or anyone else) have any ideas what else I might have to do?
Thanks
Peter
To deploy a custom assembly in Reporting Services
Copy your custom assembly from your build location to the report server
bin folder or the Report Designer folder. The default location of the
bin folder for the report server is C:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting Services\ReportServer\bin. The default
location of the Report Designer is C:\Program Files\Microsoft Visual
Studio 8\Common7\IDE\PrivateAssemblies.
If you need to grant your custom assembly code permissions beyond the
default execute permissions:
Open the appropriate configuration file. The default location of
rssrvpolicy.config is C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer. The default location of
rspreviewpolicy.config is C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies.
Add a code group for your custom assembly. For more information, see
Understanding Code Access Security in Reporting Services.
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCodeGroup"
Description="Code group for my data processing extension">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\Microsoft.Samples.ReportingServices.FsiDataExtension.dll"
/>
</CodeGroup>|||What do you mean with you "have an old version"? RS 2005 report projects
require the installation of BI Development Studio to open successfully. Can
you create report projects without custom assemblies in BI Development
Studio successfully?
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Nolan" <peter@.peternolan.com> wrote in message
news:1127651973.385470.44280@.g49g2000cwa.googlegroups.com...
> Hi Robert,
> I followed the documentation you pointed to and copied my custom
> assembly as put new code groups into the config files as specified..I
> still get the message 'The application for BI4ALL.rptproj is not
> installed' when I try to open up my visual studio project.....I have
> an old version and the only difference is the custom assembly (I
> believe).
> Do you (or anyone else) have any ideas what else I might have to do?
> Thanks
> Peter
> To deploy a custom assembly in Reporting Services
> Copy your custom assembly from your build location to the report server
> bin folder or the Report Designer folder. The default location of the
> bin folder for the report server is C:\Program Files\Microsoft SQL
> Server\MSSQL.3\Reporting Services\ReportServer\bin. The default
> location of the Report Designer is C:\Program Files\Microsoft Visual
> Studio 8\Common7\IDE\PrivateAssemblies.
> If you need to grant your custom assembly code permissions beyond the
> default execute permissions:
> Open the appropriate configuration file. The default location of
> rssrvpolicy.config is C:\Program Files\Microsoft SQL
> Server\MSSQL\Reporting Services\ReportServer. The default location of
> rspreviewpolicy.config is C:\Program Files\Microsoft Visual Studio
> 8\Common7\IDE\PrivateAssemblies.
> Add a code group for your custom assembly. For more information, see
> Understanding Code Access Security in Reporting Services.
>
> <CodeGroup class="UnionCodeGroup"
> version="1"
> PermissionSetName="FullTrust"
> Name="MyCodeGroup"
> Description="Code group for my data processing extension">
> <IMembershipCondition class="UrlMembershipCondition"
> version="1"
> Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\bin\Microsoft.Samples.ReportingServices.FsiDataExtension.dll"
> />
> </CodeGroup>
>|||Hi Robert,
yes, projects without custom assemblies are fine..
What I meant was I have a version of our reports with no custom
assemblies and they upgrade and can be previewed in BI Dev studio just
fine...they can also be deployed to reporting services web server just
fine....
When I try to copy the version of our reports with the Custom Assembly
across to 2005 I get the message 'The application for BI4ALL.rptproj is
not installed' when I try to open up my visual studio project.....So,
I am guessing it is still the CA...
I have gone through all the steps in the documentation referenced but
still cannot get the project to open...
So, I am looking for hints as to whether it is the CA and if so how I
might get it it work..
Thanks
Peter|||Hi All,
I am still working on this...Has anyone else got custom assemblies
working on July CTP for SQL Server?
Thanks
Peter|||Hi All,
thought I would add my latest efforts to trying to get my reports to
migrate across. I have got my custom assembly working on 2005...I was
able to add the custom assembly to the old version of my project and
have it run and work...so I no longer think my error message is related
to the customer assembly.
I searched this group for the message 'The application for project
'xxx.rptproj' is not installed. Make sure the application for the
project type (.rptproj) is installed.
I found this entry on the group about clearing public and private cache
but how do I clear these caches?
http://groups.google.com/group/microsoft.public.sqlserver.reportingsvcs/browse_thread/thread/7e68c4de6af07a72/7bed68d9e4214e23?q=make+sure+application+for+project+type+is+installed&rnum=1&hl=en#7bed68d9e4214e23
All ideas most welcome!!!
How did I get custom assemblies to work you may ask...
Well on CTP July.
I cannot find:
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer
I can only find...
D:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting
Services\ReportServer
where the following config files reside...
rsreportserver.config
rssrvpolicy.config
web.config
http://msdn2.microsoft.com/en-us/library/ms225486
says the following...
To deploy a custom assembly in Reporting Services
Copy your custom assembly from your build location to the report server
bin folder or the Report Designer folder. The default location of the
bin folder for the report server is C:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting Services\ReportServer\bin. The default
location of the Report Designer is C:\Program Files\Microsoft Visual
Studio 8\Common7\IDE\PrivateAssemblies.
If you need to grant your custom assembly code permissions beyond the
default execute permissions:
Open the appropriate configuration file. The default location of
rssrvpolicy.config is C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer. The default location of
rspreviewpolicy.config is C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies.
Add a code group for your custom assembly. For more information, see
Understanding Code Access Security in Reporting Services.
So I added these entries to my config files...
Snipped from my rssrvpolivy.config file..
<CodeGroup class="FirstMatchCodeGroup" version="1"
PermissionSetName="Nothing">
<IMembershipCondition class="AllMembershipCondition"
version="1" />
<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust" Name="IBIRSCustomClass"
Description="IBIRSCustomClass">
<IMembershipCondition class="UrlMembershipCondition"
version="1" Url="D:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting
Services\ReportServer\bin\IBIRSCustomClass.dll"/>
</CodeGroup>
<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. ">
<IMembershipCondition
class="StrongNameMembershipCondition" version="1"
PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100512C8E872E28569E733BCB123794DAB55111A0570B3B3D4DE3794153DEA5EFB7C3FEA9F2D8236CFF320C4FD0EAD5F677880BF6C181F296C751C5F6E65B04D3834C02F792FEE0FE452915D44AFE74A0C27E0D8E4B8D04EC52A8E281E01FF47E7D694E6C7275A09AFCBFD8CC82705A06B20FD6EF61EBBA6873E29C8C0F2CAEDDA2"
/>
</CodeGroup>
Snipped from my rspreviewpolicy.config file...
<CodeGroup class="FirstMatchCodeGroup" version="1"
PermissionSetName="Nothing">
<IMembershipCondition class="AllMembershipCondition"
version="1" />
<CodeGroup class="UnionCodeGroup" version="1"
PermissionSetName="FullTrust" Name="IBIRSCustomClass"
Description="IBIRSCustomClass">
<IMembershipCondition class="UrlMembershipCondition"
version="1" Url="D:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting
Services\ReportServer\bin\IBIRSCustomClass.dll"/>
</CodeGroup>
<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. ">
<IMembershipCondition
class="StrongNameMembershipCondition" version="1"
PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100512C8E872E28569E733BCB123794DAB55111A0570B3B3D4DE3794153DEA5EFB7C3FEA9F2D8236CFF320C4FD0EAD5F677880BF6C181F296C751C5F6E65B04D3834C02F792FEE0FE452915D44AFE74A0C27E0D8E4B8D04EC52A8E281E01FF47E7D694E6C7275A09AFCBFD8CC82705A06B20FD6EF61EBBA6873E29C8C0F2CAEDDA2"
/>
</CodeGroup>
And then it all seems to work ok.... :-)
Hope this helps someone else :-)
Peter
www.peternolan.com

Custom Assemblies Deployment

Hi,
I have 2 Reports and I created a Custom assembly. I am referencing the
Custom Assembly from both the reports and everything is working fine on my
PC.
I want to deploy those reports and the custom assembly to client. can
somebody point me the steps i need to deploy the custom assembly at the
client place.
My Problem is how can i deploy the custom assembly which my reports r
referencing.
Many Many Thanks
Chandra
--
Message posted via http://www.sqlmonster.comHi Chandra,
Hope this link will help you
http://support.microsoft.com/?kbid=842419
But I have a different problem with Custom Assembly, I am using the .NET
dll (the dll does the decryption of the credit card#).But when I view the
report on the Report Preview screen, I can see the decrypted value, but
when I deploy the rdl in my local reportserver and when I view the report
in the IE, I can see the #Error on the creditcard# field..
Do u have any clues...
Thanks in advance.
Balaji
--
Message posted via http://www.sqlmonster.com|||Thanks very much
I will look at the article
Thanks
Chandra
--
Message posted via http://www.sqlmonster.com

Custom Assemblies and Accessing report parameters

I am trying to access the datasource's parameters (connection string etc) via
the report, and passing these parameters to a custom assembly at the end of
the report, with the intention of firing off a stored procedure from this
assembly.
The assembly is done, but the connection string is hard coded.
Is there anyway of accessing these parameters direct from the report, or an
interface I can implement to achieve this?Please see my response on your other thread with the same title.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Benugo" <Benugo@.discussions.microsoft.com> wrote in message
news:F65A3AB4-D2FB-456A-8BE3-BD24CD50E5B2@.microsoft.com...
> I am trying to access the datasource's parameters (connection string etc)
via
> the report, and passing these parameters to a custom assembly at the end
of
> the report, with the intention of firing off a stored procedure from this
> assembly.
> The assembly is done, but the connection string is hard coded.
> Is there anyway of accessing these parameters direct from the report, or
an
> interface I can implement to achieve this?

Custom assemblies and accessing report parameters

I am trying to access the datasource parameters (connection string etc)
through the report with the intention of using them to fire off a stored
procedure at the end of the report. The parameters will be passed to a custom
assembly will execute the sp to update several status flags in the database.
The assembly is done and updates the status parameters, however the
connection string is currently hard coded.
Is there any way to access these parameters direct from the report, or an
interface I could implement in my assembly that would allow me access to them?Please see my response on your other thread with the same title.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Benugo" <Benugo@.discussions.microsoft.com> wrote in message
news:484BE97E-55FF-456B-94C7-C7AECE733CF1@.microsoft.com...
> I am trying to access the datasource parameters (connection string etc)
> through the report with the intention of using them to fire off a stored
> procedure at the end of the report. The parameters will be passed to a
custom
> assembly will execute the sp to update several status flags in the
database.
> The assembly is done and updates the status parameters, however the
> connection string is currently hard coded.
> Is there any way to access these parameters direct from the report, or an
> interface I could implement in my assembly that would allow me access to
them?

Custom Assemblies and accessing report connection parameters

I am trying to access the datasource connection properties (connection string
etc) from a report -I will be accessing the information via a custom
assembly, or passing it to a custom assembly with a view to firing a stored
procedure at the end of the report in order to update a number of status
flags including the last page number of a report. The custom assmbly's done,
but has a hard coded connection string - I need to get at the reports
connection string so I fire the sp in the same db as the report's bound to.
Is there any way of accessing this information direct from the report or an
interface I can implement to retrieve it?No, you cannot access this information on RS 2000. The closest you can get
to have this configurable is to add a hidden parameter (requires RS 2000
SP1) and pass this parameter to the custom assembly.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Benugo" <Benugo@.discussions.microsoft.com> wrote in message
news:DBEF289F-B31A-4318-86C0-303AFC35E5A0@.microsoft.com...
> I am trying to access the datasource connection properties (connection
string
> etc) from a report -I will be accessing the information via a custom
> assembly, or passing it to a custom assembly with a view to firing a
stored
> procedure at the end of the report in order to update a number of status
> flags including the last page number of a report. The custom assmbly's
done,
> but has a hard coded connection string - I need to get at the reports
> connection string so I fire the sp in the same db as the report's bound
to.
> Is there any way of accessing this information direct from the report or
an
> interface I can implement to retrieve it?

Custom Assemblies & ADO.NET

Hi everyone,
I have a problem with custom assemblies. I have a report which uses a custom
assembly. This custom assembly access a SQL Server database using ADO.NET.
The report runs ok in the Report Designer, but I get a error (#Error) in the
Report Manager.
I don't know if I have to makeany changes in the Report Server configuration
files in order to allow database access. And I don'tknow ig I have to add any
code to my class.
I think that there is a security problem, but I haven't found any help in
the BOL.
Thanks in advance.
Javi.Javier,
The reason for this is the Code Access Security policies that the Report
Server applies to custom code. You need to elevate the default permission
granted your custom assembly.
Please read the following thread:
http://groups.google.com/groups?hl=en&lr=&threadm=%23Rlrsz%24cEHA.1604%40TK2MSFTNGP11.phx.gbl&rnum=2&prev=/groups%3Fq%3Dsqlconnection%2Bcas%2Bgroup:*.reportingsvcs%26hl%3Den%26lr%3D%26selm%3D%2523Rlrsz%2524cEHA.1604%2540TK2MSFTNGP11.phx.gbl%26rnum%3D2
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Javier Catala" <JavierCatala@.discussions.microsoft.com> wrote in message
news:72D4CC25-1830-4A50-BB7A-3DE401746C1E@.microsoft.com...
> Hi everyone,
> I have a problem with custom assemblies. I have a report which uses a
custom
> assembly. This custom assembly access a SQL Server database using ADO.NET.
> The report runs ok in the Report Designer, but I get a error (#Error) in
the
> Report Manager.
> I don't know if I have to makeany changes in the Report Server
configuration
> files in order to allow database access. And I don'tknow ig I have to add
any
> code to my class.
> I think that there is a security problem, but I haven't found any help in
> the BOL.
> Thanks in advance.
> Javi.

Custom Assemblies

Hi,
I had an external assembly for which i had added the reference in the
report.When i view the report in PREVIEW section the report is displyed
properly with the data but when i review in browser the report is shown with
error as "Security Error" where i am referencing the external DLL. Can
anybody tell me how to set security for the external DLL.
Thanks
JasvinderLook at this thread, you have to get Reporting Services trust your DLL.
http://groups.google.de/groups?hl=de&lr=&threadm=OAxg3EQRFHA.4028%40tk2msftngp13.phx.gbl&rnum=1&prev=/groups%3Fq%3Dreporting%2Bservices%2Bassembly%2Bgac%26hl%3Dde%26lr%3D%26scoring%3Dd%26selm%3DOAxg3EQRFHA.4028%2540tk2msftngp13.phx.gbl%26rnum%3D1
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Jasvinder" <Jasvinder@.discussions.microsoft.com> schrieb im Newsbeitrag
news:7800CAD7-7871-4104-B175-9FC2133CAC9A@.microsoft.com...
> Hi,
> I had an external assembly for which i had added the reference in the
> report.When i view the report in PREVIEW section the report is displyed
> properly with the data but when i review in browser the report is shown
> with
> error as "Security Error" where i am referencing the external DLL. Can
> anybody tell me how to set security for the external DLL.
> Thanks
> Jasvinder