Link to home
Start Free TrialLog in
Avatar of Cause
CauseFlag for Ireland

asked on

Using a custom DLL in a report which uses Data.SqlClient

Hi,

I have a sql report which references a custom dll which i wrote. In this dll i access a database using the SqlClient data provider.  When i try to run the report i get the following error:

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsRuntimeErrorInExpression)

Can anyone guide me on how i can get this report to run?

Many Thanks
Avatar of Chandan_Gowda
Chandan_Gowda
Flag of United States of America image

follow the below link....
http://social.msdn.microsoft.com/Forums/en-US/clr/thread/436a125b-675a-4897-abce-624c92d7fb1c


I think you have add a security attribute for you method
Avatar of Cause

ASKER

Thanks for the reply Chandan Gowda.

I am very confused. The link seems to be concerned with file IO - should it work ok for SQL access? How do i add this security attribute in a vb.net application.

Many Thanks
SOLUTION
Avatar of Chandan_Gowda
Chandan_Gowda
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cause

ASKER

I added the line to my code but not luck - i still get the same error....
Imports System.Web
Imports System.Configuration
Imports System.Collections
 
<System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
Public Class ValueForMonth

Open in new window

Avatar of Cause

ASKER


I have also tried the steps in this solution but no luck either i really don't know what to do.

http://forums.asp.net/t/1060891.aspx
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial