I have an assembly that I wrote in .NET 2.0 for Reporting Services.
It essentially attaches to an Oracle DB and gets back a dataset.
I tried it out by a test windows application and it worked fine, however
when I try and run it within Reporting Services I get...
System.Security.SecurityException was unhandled by user code
Message="Request for the permission of type
'System.Data.OracleClient.OraclePermission, System.Data.OracleClient,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Source="mscorlib"
StackTrace:
at System.Security.CodeAccessSecurityEngine.Check(Object demand,
StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.PermissionSet.Demand()
at System.Data.Common.DbConnectionOptions.DemandPermission()
at System.Data.OracleClient.OracleConnection.PermissionDemand()
at
System.Data.OracleClient.OracleConnectionFactory.PermissionDemand(DbConnection
outerConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at Cambrex.ReportRoutines.GetParameterValue(String sConnection,
String sCompanyCode, String sName, String sDatabase)
at ReportExprHostImpl.textbox22_TextBoxExprHost.get_ValueExpr()
at
Microsoft.ReportingServices.ReportProcessing.ReportRuntime.EvaluateTextBoxValueExpression(TextBox
textBox)
Which has kind of thrown me. My assembly I wrote is Strong Named and in the
GAC. When I check the zone of the exception it is MyComputer which has Full
Trust so I am not too sure whats causing the problem.
Any ideas?
Thanks,
Craig