我收到以下錯誤MVC4應用嘗試通過安全透明的方法來訪問安全關鍵型失敗
Attempt by security transparent method 'Autofac.Integration.Mvc.RegistrationExtensions.RegisterControllers(Autofac.Cont ainerBuilder, System.Reflection.Assembly[])' to access security critical type 'Autofac.Builder.IRegistrationBuilder`3<System.Object,Autofac.Features.Scanning.ScanningActivatorData,Autofac.Builder.DynamicRegistrationStyle>' failed.
Assembly 'Autofac.Integration.Mvc, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=17863af14b0044da' 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.
我試着在下面的鏈接,給出不同的解決方案,但沒有人對我 Attempt by security transparent method to access security critical method failed
工作Attempt by security transparent method xxx to access security critical yy和 https://forums.asp.net/t/1939805.aspx
請幫
難道u得到一個機會,看看這個.https://github.com/autofac/Autofac/issues/459 – FakeisMe
你需要把更多的在這裏,像你的NuGet packages.config所以我們可以看到你在參考什麼。 –