Cause
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.Sql ClientPerm ission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c56193 4e089' failed. (rsRuntimeErrorInExpressio n)
Can anyone guide me on how i can get this report to run?
Many Thanks
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.Sql
Can anyone guide me on how i can get this report to run?
Many Thanks
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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