I'm busy upgrading my MVC site to MVC 3, Windsor 2.5.1, NHibernate 3.0 Beta1. And all previous versions worked fine. But I am hitting a wall with Windsor:
[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
...
...
Setting the site to Full trust it works, but I need to work it in Medium trust.
Reading this forum post explains that is because of new security stuff in .NET 4.
I tried adding [assembly: SecurityRules(SecurityRuleSet.Level1)] to the Windsor project which does solve the above problem, but then I'm getting the same error on the Castle.Core assembly.
Is there any better way of doing this?