问题描述
我们已将项目从MVC 4升级到MVC 5当我运行此应用程序时,我正在获取以下例外
未找到ClientDependencyModule.cs
有错误描述
An ClientDependency.Core.Mvc.dll中发生'System.TypeAccessException'类型的异常,但未在用户代码中处理
附加信息:尝试安全透明方法'ClientDependency .Core.Mvc.MvcFilter.ValidateCurrentHandler()'访问安全关键类型'System.Web.Mvc.MvcHandler'失败。
汇编'ClientDependency.Core.Mvc ,Version = 1.7.0.4,Culture = neutral,PublicKeyToken = null'标记为AllowPartiallyTrustedCallersAttribute,并使用级别2安全透明度模型。 2级透明度导致AllowPartiallyTrustedCallers程序集中的所有方法默认变为安全透明,这可能是导致此异常的原因。
在此先感谢
Syed
Hi,
We have upgraded our project from MVC 4 to MVC 5 When i Run this application I am Getting Following EXception
ClientDependencyModule.cs not found
with some error description
An exception of type 'System.TypeAccessException' occurred in ClientDependency.Core.Mvc.dll but was not handled in user code
Additional information: Attempt by security transparent method 'ClientDependency.Core.Mvc.MvcFilter.ValidateCurrentHandler()' to access security critical type 'System.Web.Mvc.MvcHandler' failed.
Assembly 'ClientDependency.Core.Mvc, Version=1.7.0.4, Culture=neutral, PublicKeyToken=null' is marked with the AllowPartiallyTrustedCallersAttribute, and uses the level 2 security transparency model. Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default, which may be the cause of this exception.
Thanks in Advance
Syed
推荐答案
这篇关于如何解决Mvc 5中的客户依赖问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!