Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Errors showing up around cast to IPermission

$
0
0

We have noticed an uptick in errors generated from our application that all display the following error with differing stack traces:

Description: System.Exception: Unable to cast object of type 'System.Runtime.CompilerServices.TrueReadOnlyCollection`1[System.Linq.Expressions.Expression]' to type 'System.Security.IPermission'. in data service xxx ---> System.InvalidCastException: Unable to cast object of type 'System.Runtime.CompilerServices.TrueReadOnlyCollection`1[System.Linq.Expressions.Expression]' to type 'System.Security.IPermission'.
   at System.Runtime.CompilerServices.RuntimeHelpers._CompileMethod(IRuntimeMethodInfo method)
   at System.Reflection.Emit.DynamicMethod.CreateDelegate(Type delegateType, Object target)
   at lambda_method(Closure )
   at System.Linq.EnumerableQuery`1.GetEnumerator()
   at System.Linq.EnumerableQuery`1.System.Collections.IEnumerable.GetEnumerator()
   at System.Data.Services.WebUtil.GetRequestEnumerator(IEnumerable enumerable)
   at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)
   at System.Data.Services.DataService`1.HandleRequest()

we have tried to reproduce but have not been able to, these errors appear to be increasing in volume.  The only trend we've been able to really see is that these errors are occurring after customers load pages that access data.  We get different flavors of this cast error, with the following objects (as an example) showing up in the error description as not castable to IPermission:

RTDynamicMethod,System.Runtime.CompilerServices.TrueReadOnlyCollection, System.Web.UI.WebControls.Repeater, System.Runtime.CompilerServices.Closure, and our own Buildium.Enterprise.Web.Shared.DataServices.Tasks.TasksDataService and Buildium.Enterprise.Web.Shared.DataServices.Residents.ResidentDataService

If anyone has seen this before or has any insight into this error I would appreciate any help as we're pretty stuck with this one right now.

Thanks!


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>