Steema.TeeChart.TChart.GetObjectData Error

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
HansW
Newbie
Newbie
Posts: 2
Joined: Wed Sep 14, 2016 12:00 am

Steema.TeeChart.TChart.GetObjectData Error

Post by HansW » Fri Jun 16, 2017 8:23 am

Hello,

in an logterm project we have an new error message with is generate by the teechart component:

During the Overriding of the Members "Steema.TeeChart.TChart.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)" Inheritance safety rules are broken.The security access of the overriding method must match the security access of the override method.

what indicates this?


Thanks and Best Regards

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Steema.TeeChart.TChart.GetObjectData Error

Post by Christopher » Fri Jun 16, 2017 3:55 pm

Hello,

The GetObjectData method is decorated with the SecurityCriticalAttribute Class in the TChart sourcecode, e.g.

Code: Select all

  [System.Security.SecurityCritical]
  public void GetObjectData(SerializationInfo info, StreamingContext context)
It could be that any override of this method must also be decorated in the same fashion.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

HansW
Newbie
Newbie
Posts: 2
Joined: Wed Sep 14, 2016 12:00 am

Re: Steema.TeeChart.TChart.GetObjectData Error

Post by HansW » Mon Jun 19, 2017 10:06 am

Dear Christopher,

i am using the ( from Source compiled) TChart Component since years without any Problem, but since i change my IDE to Visual Studio 2015 i receive this error during opening of ein Form which includes the TChart Object since al lot of releases....?!

Do you have an idea to fix it?


thanks and Best Regards

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Steema.TeeChart.TChart.GetObjectData Error

Post by Christopher » Mon Jun 19, 2017 1:17 pm

Hello,

I'm afraid I can't reproduce this problem using the latest source-code version (4.1.2017.03140) and Visual Studio 2015 - I notice that the GetObject method in both the Chart and TChart classes is decorated with the attribute I mentioned:

Code: Select all

#if VS2010
    [System.Security.SecurityCritical]
#else
    [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
#endif
    public void GetObjectData(SerializationInfo info, StreamingContext context)
have you made changes to either of those methods which do not include the System.Security.SecurityCritical attribute?
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply