I am faced with the infamous exception "Inheritance security rules violated while overriding member : Security accessibility of the overriding method must match the security accessibility of the method being overriden" exception in my project. I think I
understand security transparency level 2 and when this message is supposed to occur, and what is necessary to fix the problem. However, as far as I know, the problem should not occur here because the security attributes of the overriden method does match the
ones from the base method.
Indeed, I have a class inheriting MarshalByRefObject and overriding InitializeLifetimeService. This is the method triggering the exception but it is correctly annotated with the SecurityCriticalAttribute to match the base method's security accessibility.
public abstract class DisposableMarshalByRefObject : MarshalByRefObject, IDisposable
public override object InitializeLifetimeService()
I have two projects : a class library where DispposableMarshalByRefObject is declared and a console application for testing purposes. The console application i
View Complete Post