Castle.Core Trust Level Problem

My MVC project worked fine on the local host, when I published it on the Internet, I had this error,

Inheritance security rules that are violated when overriding an element: "Castle.MicroKernel.DefaultKernel.InitializeLifetimeService ()". Security availability for the overriding method must match the security availability for the overriding method. Description: An unhandled exception occurred during the execution of the current web request. View the stack trace for more information about the error and its occurrence in the code.

Exception Details: System.TypeLoadException: Inheritance Security Rules Violated When Overriding an Element: "Castle.MicroKernel.DefaultKernel.InitializeLifetimeService ()". Security availability for the overriding method must match the security availability for the overriding method.

Source Error:

An unhandled exception was thrown during the execution of the current web request. Information about the origin and location of the exception can be identified using the trace of the exception stack below.

Stack trace:

[TypeLoadException: inheritance security rules violated when overriding an element: "Castle.MicroKernel.DefaultKernel.InitializeLifetimeService ()". The security availability for the overriding method must match the security availability for the overriding method.] Castle.Windsor.WindsorContainer..ctor () +0 Blog.Core.Bootstrapper.Start (assembly [] assemblies) +130 Blog.MvcApplication.Application_Start () +970

I read this answer .

I recompiled the Castle project with these instructions. I deleted Castle.Core.dll safely in my project and added the recompiled Castle.Core.dll file. But I still have the same error.

What can I do? How can I solve this problem that I have been struggling with over the past 2 weeks?

+4
2

-, Full Trust. , ASP.Net, , .

, , .

0

<system.web>
  <trust level="Full" />
</system.web>

web.config,

0

All Articles