Tuesday, March 27, 2012

Datasource information retrieved from a database

Hi everyone,
I have an assembly deployed on my report server that contains a number of
functions used by my reports. The assembly has full trust and all of the
functions work fine except one.
The purpose of this function is to query a database table for the correct
connection string for the report datasource. The code that returns the
connection string works correctly in a test windows app. When I run the
report through report manager, I get the following error:
Does this mean that a report server can only use the database where it
stores its server information? This would be inconvenient and I would like
to avoid it if possible.
Also, I would prefer my assembly not to have full trust, and instead only
have the permissions necessary to allow it to read from the database where
the connection string information is stored. So far, I have found plenty of
sample code describing the XML that I need to add to grant
FileIOPermissions, but nothing on database-related permissions. Can anyone
point me in the right direction?
Thanks in advance,
Ed AllisonFor anyone else who gets stuck on this, the solution is here:
http://blogs.sqlxml.org/bryantlikes/archive/2004/07/21/845.aspx
"Ed Allison" <ed@.optix.co.uk> wrote in message
news:eMGQtxzUGHA.5996@.TK2MSFTNGP10.phx.gbl...
> Hi everyone,
> I have an assembly deployed on my report server that contains a number of
> functions used by my reports. The assembly has full trust and all of the
> functions work fine except one.
> The purpose of this function is to query a database table for the correct
> connection string for the report datasource. The code that returns the
> connection string works correctly in a test windows app. When I run the
> report through report manager, I get the following error:
> Does this mean that a report server can only use the database where it
> stores its server information? This would be inconvenient and I would
> like to avoid it if possible.
> Also, I would prefer my assembly not to have full trust, and instead only
> have the permissions necessary to allow it to read from the database where
> the connection string information is stored. So far, I have found plenty
> of sample code describing the XML that I need to add to grant
> FileIOPermissions, but nothing on database-related permissions. Can
> anyone point me in the right direction?
> Thanks in advance,
> Ed Allison
>