尝试通过安全透明方法 'x' 访问安全关键方法 'System.Runtime.InteropServices.GCHandle.Alloc(System.Object)' 失败

Attempt by security transparent method 'x' to access security critical method 'System.Runtime.InteropServices.GCHandle.Alloc(System.Object)' failed

我有一个由 Devexpress.I 创建的 MVC 应用程序在

上出现此错误

www.site.com/Accoun/Login

Attempt by security transparent method 'DevExpress.XtraScheduler.Native.   
FullTrustAppointmentMultiClientCacheItem.CreateHandler()' to access security critical method 'System.Runtime.InteropServices.GCHandle.Alloc(System.Object)' failed.

Assembly 'DevExpress.XtraScheduler.v13.2.Core, Version=13.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' is partially trusted, 
which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself.  
In order to access security critical code, this assembly must be fully trusted.

我该如何解决?

如果不了解这种情况的所有方面,就很难提出建议。您应该 report this issue 直接联系 DevExpress 支持团队并向他们提供详细信息。我相信他们的人可以诊断错误并为您指明在 MVC 环境中使用 Scheduler 的正确方向。

相关支持文章:ASPxScheduler and Medium Trust