3
votes

I have a asp.net 4.0 website which works fine on dev machine. When I try to access the same service hosted on a external web server I get following error

The server encountered an error processing the request. The exception message is '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.'. See server logs for more details. The exception stack trace is: ...

I am using castle windsor 2.5 I tried using later version of castle windsor but to no avail. Could someone please suggest how can i fix this issue. thanks

1
See [this answer][1] for very good explanation of what the issue is. [1]: stackoverflow.com/questions/4713123/… - Krzysztof Kozmic
Is this an issue with Castle.Core or Castle.Windsor and has this issue been addressed in the latest version of castle windsor? one would expect the newer version to be compatible with latest .net framework and the api users should not be concerned with implementation gaps. Where is the source code for Core and Windsor? Thanks - joblot

1 Answers

5
votes

Try adding to the system.web section of your web.config file. It worked for me on a GoDaddy hosted site.

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