ReportViewer crash on parameter

ReportViewer crash on parameter

Old forum URL: forums.lhotka.net/forums/t/11461.aspx


superkuton posted on Sunday, July 08, 2012

Environment:

Visual Studio 2012, .NET 4.5, CSLA 4.5

Problem:

A reportviewer works ok, but when passed in a parameter encounters an error.

Exceptions:

An error occurred during local report processing. Failed to load expression host assembly.Details: Attempt by method Csla.Core.FieldManager.FieldDataManager.ForceStatic.FieldInit(System.Type) to access field Csla.ReadOnlyBase Project.Library.Security.PTIdentity ... CachedAnonymousMethodDelegate2 failed.

Digging into the errors, I found the following exception thrown:

"Request for the permission of type System.Security.Permisions.ReflectionPermission, mscorlib, version 4.0.0.0, ...... failed."

 

Please help. Thanks.

superkuton replied on Sunday, July 08, 2012

I was able to google a solution from this link.

Do you have any other solution guys, like an application-wide setting? Or this is just ok?

JonnyBee replied on Sunday, July 08, 2012

Looks good to me!! Nice solution.

Copyright (c) Marimer LLC