Showing posts with label permissions. Show all posts
Showing posts with label permissions. Show all posts

Tuesday, March 20, 2012

Custom Source extension & file permissions

I programmed a Source extension, that accesss a text file. In my code I have the following code to open a file:

protected override void reader(PipelineBuffer buffer)

{

TextReader reader = File.OpenText(_filename);

The komponnet works well. How do I grant permissions to access this text file? Because I got problems when I try to run my package using a task created in the SQL Server Agent.

This sounds like a how do I use windows file security question, not a SSIS issue at all. Simple, use Windows Explorer, and select the drive, folder or file and right-click to access the security tab. Is that really what you are asking?

Have you determined the security context (account) used by SQL Agent? You will of course need to do this to grant that account with the correct permissions.

This also seems unrelated to the component used.

|||

I coudn't access the resources. I used the following \\server\share

And it works!

Custom server permissions?

Hi,
I need to grant a user access to one or two specific system stored
procs without giving permission to everything else in the fixed server
role that allows them. Specifically, they need rights to
sp_addlinkedserver and sp_addlinkedsrvlogin, but they shouldn't have
all the rights associated with securityadmin. Is there a way to grant
specific rights to just these?
TIA,
BarryBoth of these system stored procedures have hard coded permission checks in
them. I'm not a big fan of these as it really limits flexibility. The only
way would be to alter them to remove these checks but this would not be a
supported scenario. sp_addlinkedserver has a hard coded check for membership
of the setupadmin server role and sp_addlinkedsrvlogin has a hard coded
check for membership of the securityadmin server role. The only alternative
would be one that I use a lot for scenarios where I want lower privilege
users to be able to do a very specific action and that is to write a queue
system whereby they basically have a table that they can insert rows into
via a stored procedure and this table is polled by a SQL Agent job that runs
once a minute and executes the specific commands they are allowed to run.
This way you can code so they can only do a very specific action (otherwise
you would lead yourself open a large security hole)
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
<barrygilbertusa_no_spam@.yahoo.com> wrote in message
news:1101316733.934708.165050@.f14g2000cwb.googlegroups.com...
> Hi,
> I need to grant a user access to one or two specific system stored
> procs without giving permission to everything else in the fixed server
> role that allows them. Specifically, they need rights to
> sp_addlinkedserver and sp_addlinkedsrvlogin, but they shouldn't have
> all the rights associated with securityadmin. Is there a way to grant
> specific rights to just these?
> TIA,
> Barry
>|||Jasper,
Thanks for your reply. I'll give this a try.
Barry
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message news:<#hwMr6n0EHA.1392@.TK2MSFTNG
P14.phx.gbl>...[vbcol=seagreen]
> Both of these system stored procedures have hard coded permission checks i
n
> them. I'm not a big fan of these as it really limits flexibility. The only
> way would be to alter them to remove these checks but this would not be a
> supported scenario. sp_addlinkedserver has a hard coded check for membersh
ip
> of the setupadmin server role and sp_addlinkedsrvlogin has a hard coded
> check for membership of the securityadmin server role. The only alternativ
e
> would be one that I use a lot for scenarios where I want lower privilege
> users to be able to do a very specific action and that is to write a queue
> system whereby they basically have a table that they can insert rows into
> via a stored procedure and this table is polled by a SQL Agent job that ru
ns
> once a minute and executes the specific commands they are allowed to run.
> This way you can code so they can only do a very specific action (otherwis
e
> you would lead yourself open a large security hole)
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> <barrygilbertusa_no_spam@.yahoo.com> wrote in message
> news:1101316733.934708.165050@.f14g2000cwb.googlegroups.com...

Friday, February 24, 2012

Custom Code for a Parameter

I'm using a GAC-installed assembly as part of a Reporting Services

(2005) report. The code does not need any permissions beyond execution.

All it does it take today's date and calculate last week's start and

end date. It's all just datetime manipulations. All methods are static.

In

the VS2005 report designer, I can do everything fine. The code runs as

expected and defaults the parameters to the right date.

When I

upload the rdl to the Report Server, I get the message "Error during

processing of ‘Start’ report parameter.

(rsReportParameterProcessingError) ". If I override the "Start"

parameter, it doesn't give me that error anymore. Start should be the

Sunday of the previous week.

I have deployed the signed assembly to the GAC on the report server as well as the bin folder for reporting services. Because it doesn't need anything beyond execution, I shouldn't have to modify any config files, right? I have already restarted IIS & the Reporting Services service.

What am I missing?

You need to mark the assembly with AllowPartiallyTrustedCallersAttribute.Once you deploy it to PrivateAssemblies folder (C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies) you should be able to hit F5 to debug it with the Report Host and see if something else is erroring out.

|||That was it. :) Attaching the attribute solved the problem!|||

Hello,

I defined an input parameter with the default value of ("Input_From_Year") and use it in the query as @.fromYear. When I go to Preview I see the result fine, but when I say Debug-> Start I see the following error in the internet explorer. Error during processing of 'fromYear' report parameter. (rsReportParameterProcessingError),but If I remove @.fromYear in the query, internet explorer works fine. What is problem?

Thanks!

|||Not quite sure what you mean by Debug->Start and IE and what your setup is but if this works in the Report Designer but it doesn't work on the server (or under the Report Host), most likely it's a security issue. If your custom assembly requires more that just Execution trust you need to elevate its rights as shown in this article.|||

I means the report can works in the report designer,but it doesn't work on the server after i deployed it to the server.deploy successfully,why does it give me the message that is Error during processing of 'fromYear' report parameter.(rsReportParameterProcessingError),I am not sure whether it's a security issue,but I check my custom assemblies,it is fullturst.

and any other reasons more?

|||

Hi Jason,

even I am facing same problem, where I am also getting same error called "error during processing of 'Validate' parameter."

did you got any solution.

If yes please share the solution with me.

thanks in advance,

Ramesh KS

|||

Hi,

Am facing the same problem. Did any one got the solution, please do share.

TIA

|||

Teo,

Would I have this same issue trying to use System.DirectoryServices?

R

Custom Code for a Parameter

I'm using a GAC-installed assembly as part of a Reporting Services

(2005) report. The code does not need any permissions beyond execution.

All it does it take today's date and calculate last week's start and

end date. It's all just datetime manipulations. All methods are static.

In

the VS2005 report designer, I can do everything fine. The code runs as

expected and defaults the parameters to the right date.

When I

upload the rdl to the Report Server, I get the message "Error during

processing of ‘Start’ report parameter.

(rsReportParameterProcessingError) ". If I override the "Start"

parameter, it doesn't give me that error anymore. Start should be the

Sunday of the previous week.

I have deployed the signed assembly to the GAC on the report server as well as the bin folder for reporting services. Because it doesn't need anything beyond execution, I shouldn't have to modify any config files, right? I have already restarted IIS & the Reporting Services service.

What am I missing?

You need to mark the assembly with AllowPartiallyTrustedCallersAttribute.Once you deploy it to PrivateAssemblies folder (C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies) you should be able to hit F5 to debug it with the Report Host and see if something else is erroring out.

|||That was it. :) Attaching the attribute solved the problem!|||

Hello,

I defined an input parameter with the default value of ("Input_From_Year") and use it in the query as @.fromYear. When I go to Preview I see the result fine, but when I say Debug-> Start I see the following error in the internet explorer. Error during processing of 'fromYear' report parameter. (rsReportParameterProcessingError),but If I remove @.fromYear in the query, internet explorer works fine. What is problem?

Thanks!

|||Not quite sure what you mean by Debug->Start and IE and what your setup is but if this works in the Report Designer but it doesn't work on the server (or under the Report Host), most likely it's a security issue. If your custom assembly requires more that just Execution trust you need to elevate its rights as shown in this article.|||

I means the report can works in the report designer,but it doesn't work on the server after i deployed it to the server.deploy successfully,why does it give me the message that is Error during processing of 'fromYear' report parameter.(rsReportParameterProcessingError),I am not sure whether it's a security issue,but I check my custom assemblies,it is fullturst.

and any other reasons more?

|||

Hi Jason,

even I am facing same problem, where I am also getting same error called "error during processing of 'Validate' parameter."

did you got any solution.

If yes please share the solution with me.

thanks in advance,

Ramesh KS

|||

Hi,

Am facing the same problem. Did any one got the solution, please do share.

TIA

|||

Teo,

Would I have this same issue trying to use System.DirectoryServices?

R

Custom Code for a Parameter

I'm using a GAC-installed assembly as part of a Reporting Services

(2005) report. The code does not need any permissions beyond execution.

All it does it take today's date and calculate last week's start and

end date. It's all just datetime manipulations. All methods are static.

In

the VS2005 report designer, I can do everything fine. The code runs as

expected and defaults the parameters to the right date.

When I

upload the rdl to the Report Server, I get the message "Error during

processing of ‘Start’ report parameter.

(rsReportParameterProcessingError) ". If I override the "Start"

parameter, it doesn't give me that error anymore. Start should be the

Sunday of the previous week.

I have deployed the signed assembly to the GAC on the report server as well as the bin folder for reporting services. Because it doesn't need anything beyond execution, I shouldn't have to modify any config files, right? I have already restarted IIS & the Reporting Services service.

What am I missing?

You need to mark the assembly with AllowPartiallyTrustedCallersAttribute.Once you deploy it to PrivateAssemblies folder (C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies) you should be able to hit F5 to debug it with the Report Host and see if something else is erroring out.

|||That was it. :) Attaching the attribute solved the problem!|||

Hello,

I defined an input parameter with the default value of ("Input_From_Year") and use it in the query as @.fromYear. When I go to Preview I see the result fine, but when I say Debug-> Start I see the following error in the internet explorer. Error during processing of 'fromYear' report parameter. (rsReportParameterProcessingError),but If I remove @.fromYear in the query, internet explorer works fine. What is problem?

Thanks!

|||Not quite sure what you mean by Debug->Start and IE and what your setup is but if this works in the Report Designer but it doesn't work on the server (or under the Report Host), most likely it's a security issue. If your custom assembly requires more that just Execution trust you need to elevate its rights as shown in this article.|||

I means the report can works in the report designer,but it doesn't work on the server after i deployed it to the server.deploy successfully,why does it give me the message that is Error during processing of 'fromYear' report parameter.(rsReportParameterProcessingError),I am not sure whether it's a security issue,but I check my custom assemblies,it is fullturst.

and any other reasons more?

|||

Hi Jason,

even I am facing same problem, where I am also getting same error called "error during processing of 'Validate' parameter."

did you got any solution.

If yes please share the solution with me.

thanks in advance,

Ramesh KS

|||

Hi,

Am facing the same problem. Did any one got the solution, please do share.

TIA

|||

Teo,

Would I have this same issue trying to use System.DirectoryServices?

R

Custom Code for a Parameter

I'm using a GAC-installed assembly as part of a Reporting Services

(2005) report. The code does not need any permissions beyond execution.

All it does it take today's date and calculate last week's start and

end date. It's all just datetime manipulations. All methods are static.

In

the VS2005 report designer, I can do everything fine. The code runs as

expected and defaults the parameters to the right date.

When I

upload the rdl to the Report Server, I get the message "Error during

processing of ‘Start’ report parameter.

(rsReportParameterProcessingError) ". If I override the "Start"

parameter, it doesn't give me that error anymore. Start should be the

Sunday of the previous week.

I have deployed the signed assembly to the GAC on the report server as well as the bin folder for reporting services. Because it doesn't need anything beyond execution, I shouldn't have to modify any config files, right? I have already restarted IIS & the Reporting Services service.

What am I missing?

You need to mark the assembly with AllowPartiallyTrustedCallersAttribute.Once you deploy it to PrivateAssemblies folder (C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies) you should be able to hit F5 to debug it with the Report Host and see if something else is erroring out.

|||That was it. :) Attaching the attribute solved the problem!|||

Hello,

I defined an input parameter with the default value of ("Input_From_Year") and use it in the query as @.fromYear. When I go to Preview I see the result fine, but when I say Debug-> Start I see the following error in the internet explorer. Error during processing of 'fromYear' report parameter. (rsReportParameterProcessingError),but If I remove @.fromYear in the query, internet explorer works fine. What is problem?

Thanks!

|||Not quite sure what you mean by Debug->Start and IE and what your setup is but if this works in the Report Designer but it doesn't work on the server (or under the Report Host), most likely it's a security issue. If your custom assembly requires more that just Execution trust you need to elevate its rights as shown in this article.|||

I means the report can works in the report designer,but it doesn't work on the server after i deployed it to the server.deploy successfully,why does it give me the message that is Error during processing of 'fromYear' report parameter.(rsReportParameterProcessingError),I am not sure whether it's a security issue,but I check my custom assemblies,it is fullturst.

and any other reasons more?

|||

Hi Jason,

even I am facing same problem, where I am also getting same error called "error during processing of 'Validate' parameter."

did you got any solution.

If yes please share the solution with me.

thanks in advance,

Ramesh KS

|||

Hi,

Am facing the same problem. Did any one got the solution, please do share.

TIA

|||

Teo,

Would I have this same issue trying to use System.DirectoryServices?

R

Custom Code for a Parameter

I'm using a GAC-installed assembly as part of a Reporting Services

(2005) report. The code does not need any permissions beyond execution.

All it does it take today's date and calculate last week's start and

end date. It's all just datetime manipulations. All methods are static.

In

the VS2005 report designer, I can do everything fine. The code runs as

expected and defaults the parameters to the right date.

When I

upload the rdl to the Report Server, I get the message "Error during

processing of ‘Start’ report parameter.

(rsReportParameterProcessingError) ". If I override the "Start"

parameter, it doesn't give me that error anymore. Start should be the

Sunday of the previous week.

I have deployed the signed assembly to the GAC on the report server as well as the bin folder for reporting services. Because it doesn't need anything beyond execution, I shouldn't have to modify any config files, right? I have already restarted IIS & the Reporting Services service.

What am I missing?

You need to mark the assembly with AllowPartiallyTrustedCallersAttribute.Once you deploy it to PrivateAssemblies folder (C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies) you should be able to hit F5 to debug it with the Report Host and see if something else is erroring out.

|||That was it. :) Attaching the attribute solved the problem!|||

Hello,

I defined an input parameter with the default value of ("Input_From_Year") and use it in the query as @.fromYear. When I go to Preview I see the result fine, but when I say Debug-> Start I see the following error in the internet explorer. Error during processing of 'fromYear' report parameter. (rsReportParameterProcessingError),but If I remove @.fromYear in the query, internet explorer works fine. What is problem?

Thanks!

|||Not quite sure what you mean by Debug->Start and IE and what your setup is but if this works in the Report Designer but it doesn't work on the server (or under the Report Host), most likely it's a security issue. If your custom assembly requires more that just Execution trust you need to elevate its rights as shown in this article.|||

I means the report can works in the report designer,but it doesn't work on the server after i deployed it to the server.deploy successfully,why does it give me the message that is Error during processing of 'fromYear' report parameter.(rsReportParameterProcessingError),I am not sure whether it's a security issue,but I check my custom assemblies,it is fullturst.

and any other reasons more?

|||

Hi Jason,

even I am facing same problem, where I am also getting same error called "error during processing of 'Validate' parameter."

did you got any solution.

If yes please share the solution with me.

thanks in advance,

Ramesh KS

|||

Hi,

Am facing the same problem. Did any one got the solution, please do share.

TIA

|||

Teo,

Would I have this same issue trying to use System.DirectoryServices?

R

Sunday, February 19, 2012

Custom Auditing

We are having to implement restrictive security permissions on SQL, some of
which requires that we audit and log any access of any kind for specific
tables and columns. What would be the best way to do this? We can use
triggers to log any changes to specific tables and columns, but we can't use
those when a user is simply retrieving sensitive and encrypted data from a
table. We could lock down access permissions to those tables so that only
authorized users can execute stored procedures, and have code to log such
access in the procs themselves, but we need to ensure that even if the dbo
or sa were to access that data, that it would be logged.
TIA
Michael MacGregor
Database ArchitectMichael,
If you want to log accesses, even of the dbo or sa, then you pretty much
will have to use Profiler. You can put the traces into tables for online
auditing, either directly or by periodically importing the trace files.
There are also probably some third-party auditing tools.
RLF
"Michael MacGregor" <nospam@.nospam.com> wrote in message
news:OyGkG4tyHHA.3536@.TK2MSFTNGP06.phx.gbl...
> We are having to implement restrictive security permissions on SQL, some
> of which requires that we audit and log any access of any kind for
> specific tables and columns. What would be the best way to do this? We can
> use triggers to log any changes to specific tables and columns, but we
> can't use those when a user is simply retrieving sensitive and encrypted
> data from a table. We could lock down access permissions to those tables
> so that only authorized users can execute stored procedures, and have code
> to log such access in the procs themselves, but we need to ensure that
> even if the dbo or sa were to access that data, that it would be logged.
> TIA
> Michael MacGregor
> Database Architect
>|||Thanks again Russell.
MTM

custom assmebly permissions (I really need help)

I try to deploy a custom assembly which access a oracle database.
I' read all post in this news group about it and also the policies refered.
I'm very confused now, becouse it is a huge amount of information and I
wonder how unspecific it is.
I need exactly to know which file I must change how and where exactly in the
file. I tried many combinations, but I have a deadline on the project an I'm
really in troubles.
In the KB Articles are CodeGroups described and also PermissionSets 3 files
to modify described too, but which file must be how modified is not described.
Please help me somebody with detailled information. It really drives me to
despair.The assembly by it self works if I remove the code for access the oracle
database.
In a article is mentoined that the code inside the assembly must be modified
too. But I don't know how to transfer this to my VB Assmebly. But this is
possibly not the only wrong thing in my project.
The purpose of the assembly is localization. And in the database still
exists a table with translations used by the application used to maintain the
data. Therefore I must access the database with the assemly.
And btw. I can not understand why the samples are for file access
permissions. How many people will store f.e. currency information in a xml
file on the server? How does the data uses by RS come usual into the
database? Posibly with existing other applications? Or does RS support data
maintainance?
"Dev Main" wrote:
> I try to deploy a custom assembly which access a oracle database.
> I' read all post in this news group about it and also the policies refered.
> I'm very confused now, becouse it is a huge amount of information and I
> wonder how unspecific it is.
> I need exactly to know which file I must change how and where exactly in the
> file. I tried many combinations, but I have a deadline on the project an I'm
> really in troubles.
> In the KB Articles are CodeGroups described and also PermissionSets 3 files
> to modify described too, but which file must be how modified is not described.
> Please help me somebody with detailled information. It really drives me to
> despair.

Custom Assemply Permissions Problem

I have a custom assembly that I want to use to access some SQL Server data. I'm pretty sure this is a security problem but don't know how to resolve it. This is my function in my assembly (commented most of it out until I get something to work).

PublicSharedFunction DataTest2()AsStringDim permission =New SqlClientPermissionAttribute(Security.Permissions.SecurityAction.Assert)

permission.Assert()

'Dim ds As DataSetDim strReturnValueAsString

strReturnValue =

"OK"'Dim sqlCN As New SqlClient.SqlConnection("server=EOPS; database=RegionAmericas; uid=sa; pwd=thebo$$")'Dim sqlCMD As New SqlClient.SqlCommand'Dim intNumRows As Integer = 0

'strReturnValue = ""'sqlCMD.CommandText = "SELECT DESCRIPTION " & _' "FROM tblCountry WITH (NOLOCK) " & _' "WHERE COUNTRY='US'"

'Dim da As New SqlDataAdapter(sqlCMD)'Try' ds = New DataSet' da.Fill(ds, "Country")' intNumRows = ds.Tables(0).Rows.Count' If intNumRows > 0 Then' strReturnValue = ds.Tables(0).Rows(0).Item(0).ToString' End If'Catch ex As Exception' MsgBox(ex.Message)'End Try

DataTest2 = strReturnValue

EndFunction

Then I added this to rssrvpolicy file (both locally and on the server)

<CodeGroup
class="FirstMatchCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCustomAssemblyCodeGroup"
Description="A special code group for M4 Custom Assemblies.">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\M4Functions.dll"/>
</CodeGroup>

What else do I have to do? The report just shows #error. Thanks, Phill

try including ur assembly in ur global assembly cache.

Custom assembly security

Hi
I have a function that checks if a user is in a Windows domain group. (John
is in Administrator group?). What kind of security permissions is required
to execute my function?
<'')> _
Public Shared Function UserIsInGroup(ByVal Group As String) As String
Dim currentIdentity As WindowsIdentity = WindowsIdentity.GetCurrent()
......
End Function
Thanks
AndresAs outlined on MSDN, the GetCurrent() call requires security permissions
with the ControlPrincipal flag. See also:
*
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemSecurityPrincipalWindowsIdentityClassGetCurrentTopic.asp
*
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemSecurityPermissionsSecurityPermissionFlagClassTopic.asp
Embedded code in a report has ExecutionOnly permission (open
rssrvpolicy.config and search for the CodeGroup with the
name="Report_Expressions_Default_Permissions").
You might consider one of these:
* move the code into a custom assembly, give the custom assembly the
required permissions and assert(!) the permission in the custom assembly
methods prior to invoking .GetCurrent().
* or give the CodeGroup for report expressions more default permissions
(which is not recommended).
However, before modifying any configuration files and security permissions I
recommend to backup your current config files and read the MSDN article
about code security in RS:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/dngrfCodeAccessSecurityInSQLServer2000ReportingServices.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"afontan" <andres.fontan@.alcuadrado.com> wrote in message
news:eiAsm6PeEHA.2812@.tk2msftngp13.phx.gbl...
> Hi
> I have a function that checks if a user is in a Windows domain group.
(John
> is in Administrator group?). What kind of security permissions is required
> to execute my function?
> <'')> _
> Public Shared Function UserIsInGroup(ByVal Group As String) As String
> Dim currentIdentity As WindowsIdentity = WindowsIdentity.GetCurrent()
> ......
> End Function
> Thanks
> Andres
>

custom assembly permissions woes

i have a custom assembly that was working fine, and i've set the basic
permissions needed in the RSReportServer.config file and all was good
however i've just added functionality that uses
System.DirectoryServices and the new code works fine within
visualstudio but i'm quite confused on what i need to do to get it
working on reporting services.
i'll willing to give full permissions to the assembly - at least in
the beginning just to get it running.
KarlKarl,
The exception that gets thrown should describe the failing element (the name
of the secure resource thats broken the security rule)
Hint: take a look at the top of the RSServerPolicy.config file and you'll
see the security permission types - these should provide a clue to which one
you need to use
You'll need to assert this required permission too in your CA and you'll
also need to ensure your CodeGroup (where the CA DLL has been defined) has
the required level defined also.
regards,
- peteZ
"Karl Prosser" <klumsy@.xtra.co.nz> wrote in message
news:7156880c.0410110045.33f32ff5@.posting.google.com...
>i have a custom assembly that was working fine, and i've set the basic
> permissions needed in the RSReportServer.config file and all was good
> however i've just added functionality that uses
> System.DirectoryServices and the new code works fine within
> visualstudio but i'm quite confused on what i need to do to get it
> working on reporting services.
> i'll willing to give full permissions to the assembly - at least in
> the beginning just to get it running.
> Karl|||Hi Karl,
Did you ever find a solution to this problem?
I have made a few similar postings with no luck.
Works fine for System.Data.SqlClient but not with System.DirectoryServices.
Cheers,
Flon
"Karl Prosser" wrote:
> i have a custom assembly that was working fine, and i've set the basic
> permissions needed in the RSReportServer.config file and all was good
> however i've just added functionality that uses
> System.DirectoryServices and the new code works fine within
> visualstudio but i'm quite confused on what i need to do to get it
> working on reporting services.
> i'll willing to give full permissions to the assembly - at least in
> the beginning just to get it running.
> Karl
>

custom assembly permissions

I wrote a custom assembly which access a oracle server database (ODBC). The
report failes on the RS Server, not in the Report Designer.
The problem is the database access, without it the assembly works.
I modified RSReportServer.config and rssrvpolicy.config. I read everything
I could find about the subject (spend more then 50 hours). But I'm still poke
around in the fog.
Can somebody instruct me by give me the exact code he is using in the config
files and in the assembly? It seems the code must be modified too, I tried
but it doesn't work.
Thanks in advance!Right now, the .NET Framework provider for ODBC is not yet enabled for
partial trust scenarios. It currently requires FullTrust permissions (this
will change in a future version). So, unless your custom assembly has
FullTrust permissions, it won't work because asserting OdbcPermission has no
effect (details can also be found on MSDN: OdbcPermission class). In the
particular case of using ODBC to connect to Oracle you definitely need to
give the assembly FullTrust permissions and assert them inside the custom
assembly (see code snippet below which asserts the FullTrust permission
inside the custom assembly via an attribute):
[PermissionSet(SecurityAction.Assert, Unrestricted=true)]
public foo()
{
// ...
OdbcConnection cn = new OdbcConnection("..... connection string");
cn.Open();
// ...
}
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dev Main" <DevMain@.discussions.microsoft.com> wrote in message
news:09D9ED7E-5473-4876-BEFF-47234BCAA4BE@.microsoft.com...
>I wrote a custom assembly which access a oracle server database (ODBC). The
> report failes on the RS Server, not in the Report Designer.
> The problem is the database access, without it the assembly works.
> I modified RSReportServer.config and rssrvpolicy.config. I read
> everything
> I could find about the subject (spend more then 50 hours). But I'm still
> poke
> around in the fog.
> Can somebody instruct me by give me the exact code he is using in the
> config
> files and in the assembly? It seems the code must be modified too, I tried
> but it doesn't work.
> Thanks in advance!