Inheritance security rules violated while overriding member - by ErnestoC75

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


3
0
Sign in
to vote
ID 464751 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 6/6/2009 2:23:11 AM
Access Restriction Public

Description

I've tried to build a web application using ASP.NET MVC and Sping.Net but it seems that while loading several classing using Reflection, the following error appears at runtime:

Inheritance security rules violated while overriding member: 'System.Web.Mvc.TempDataDictionary.System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)'. Security accessibility of the overriding method must match the security accessibility of the method being overriden.

The exception appears not always on the same method and the behaviour changes if I change the application pool mode from Classic to Integrated.
Sign in to post a comment.
Posted by Microsoft on 11/30/2009 at 12:29 PM
Hi,
Security attributes need to be re-applied on types that derive from other types that also have security attributes.

Thanks,
The ASP.NET Team
Posted by Alien003 on 7/21/2009 at 2:05 PM
I also had tons of problems like this on my project. Check if your implementation of GetObjectData has a [SecurityCritical] attribute. Also this happens in simpler cases than using reflection.
Same goes for the IObjectReference.GetRealObject and similar stuff.
Posted by Microsoft on 6/8/2009 at 4:30 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)