Page 1 of 1

Steema.TeeChart.TChart.GetObjectData Error

Posted: Fri Jun 16, 2017 8:23 am
by 16079147
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

Re: Steema.TeeChart.TChart.GetObjectData Error

Posted: Fri Jun 16, 2017 3:55 pm
by Christopher
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.

Re: Steema.TeeChart.TChart.GetObjectData Error

Posted: Mon Jun 19, 2017 10:06 am
by 16079147
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

Re: Steema.TeeChart.TChart.GetObjectData Error

Posted: Mon Jun 19, 2017 1:17 pm
by Christopher
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?