Hello,
I'm testing out a fresh copy of CRM 2015 on-premises with SQL Server 2014 Enterprise on top of Windows Server 2012 R2 and have an issue with SSRS report that uses custom DLL to query SQL server.
I have a blank report with a single textbox and I referenced my assembly in report properties. I'm using textbox expression to return string from my custom assembly (just for testing purpose) and everything works fine until I add these 2 rows before making a query to SQL server:
Dim pSql As New System.Data.SqlClient.SqlClientPermission(Security.Permissions.PermissionState.Unrestricted)
pSql.Assert()
When I try to preview or run it in DebugLocal mode Visual Studio 2012 shows this error:
Request for permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKey Token=b77a5c561934e089' failed.
Any other action that doesn't require access to SQL server from assembly works fine. Visual Studio is launched through Run as Administrator...
I tried every solution that I found on Google to solve this but nothing helps yet. I added my assembly to GAC using gacutil -i, turned the firewall off, done everything mentioned in here and in here.
CRM, SQL Server and Active Directory domain runs on the same machine. Any suggestions what else should I try?
p.s. I'm testing this because I have a on-premises CRM 2013 that my organization uses for some years and we want to upgrade to CRM 2016. We have a lot of business logic inside custom assemblies so it's crucial for us that this SSRS + custom assembly + SQL server thing works.