0

I am new to SSH connection & trying to connect using SSH connection but getting exception:

Inheritance security rules violated while overriding member: 'Renci.SshNet.Common.SshException.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.

Please somebody help me to resolve this issue

1 Answer 1

1

Mark GetObjectData with SecurityCriticalAttribute, because it's applied to Exception.GetObjectData. An overridden member should have the same security accessibility (Critical, Safe Critical or Transparent).

More info

enter image description here

Sign up to request clarification or add additional context in comments.

5 Comments

Try adding [SecurityCritical] before your method declaration
alexx..please help me
I have no idea bout renci.sshnet.dll, But what Alexander told you is to put [SecurityCritical] right above 'Private void DoConnect()'
Is there any other library for ssh connection except renci
Try Grandos , or sshnet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.