我的MVC項目已在當我有它發表在網絡本地主機運行正常,我有這個錯誤,Castle.Core信任級別問題
Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[TypeLoadException: Inheritance security rules violated while overriding member: 'Castle.MicroKernel.DefaultKernel.InitializeLifetimeService()'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.] Castle.Windsor.WindsorContainer..ctor() +0 Blog.Core.Bootstrapper.Start(Assembly[] assemblies) +130 Blog.MvcApplication.Application_Start() +970
我已閱讀this answer。
我用這些指令重新編譯了Castle Project。我在我的項目中安全地刪除了Castle.Core.dll並添加了重新編譯的Castle.Core.dll。但我仍然有同樣的錯誤。
我該怎麼辦?我怎樣才能解決過去兩週一直在苦苦掙扎的這個問題?
聽起來像一個IIS /反射問題給我。您需要充分信任地運行 – user3210546 2014-09-05 22:02:26
@ user3210546是的,我需要但我的託管服務不允許,我應該找到一個解決方案。 – 2014-09-06 04:44:34