I have developed a small VB.NET / ASP application using Visual Studio 2010, and I have added a simple Crystal Reports .NET Framework 4.0 report to the site.
It runs ok on my local PC when I test it using VS 2010, but when I try and run it on the remote server (Fasthosts) it crashes with :-
[SecurityException: That assembly does not allow partially trusted callers.]
CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() +0
I have looked at many forums to try and get an answer, and so far I have created the following program :-
Assemblyinfo.vb containing :-
<Assembly: AllowPartiallyTrustedCallers()>
<AttributeUsage(AttributeTargets.Assembly)>
Public NotInheritable Class AllowPartiallyTrustedCallersAttribute
Inherits Attribute
End Class
and I have put these 2 lines at the top of my VB program that calls the report :-
Imports System.Security
<Assembly: AllowPartiallyTrustedCallers()>
This seems quite a complicated area, and I would be very grateful for any help.
Thanks
Geoff
You can get them here
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22083
mlmcc