Home Dashboard Directory Help
Search

Inheritance security rules violated while overriding member by ErnestoC75


Status: 

Closed
 as By Design Help for as By Design


3
0
Sign in
to vote
Type: Bug
ID: 464751
Opened: 6/6/2009 2:23:11 AM
Access Restriction: Public
0
Workaround(s)
view
2
User(s) can reproduce this bug

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.
Details
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)
Sign in to post a workaround.