Hello all,
I've developed an application on .net Framework 3.5 and I'm currently migrating it on .net Framework 4.
I'm facing a problem with security policies related to ReportViewer.
In my application, I'm using a specific .dll to format numbers and this .dll is called by several local reports (.rdlc files). In order for the project to compile, I dutifully copy the .dll in the Common 7\IDE\Private Assemblies directory.
I also included these two lines of code (which I found on the blog of a development genius, but I don't really understand them) in the form that contains the ReportViewer:
myReportViewer.LocalReport.ExecuteReportInCurrentAppDomain(Reflection.Assembly.GetExecutingAssembly().Evidence) myReportViewer.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("A3I.Adonat.Métier, Version=8.3.0.0, Culture=neutral, PublicKeyToken=null")
Now these lines of code don't run...
What should I do ? Is there another way of using a custom .dll in a local report ? I've followed the Microsoft documentation and placed the following line in my App.config :
<runtime><NetFx40_LegacySecurityPolicy enabled="true"/></runtime>
but it still doesn't work...
Please help!!