You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renci.SshNet/Netconf/NetConfSession.cs -> _messageId is undefined when calling SendReceiveRpc.
The following code:
var netConfClient = new NetConfClient("hostname.here", 830, "usernamehere", "passwordhere");
netConfClient.Connect();
if (netConfClient.IsConnected)
{
XmlDocument rpc = new XmlDocument();
rpc.LoadXml("<rpc><get-interface-information></get-interface-information></rpc>");
var rpcResponse = netConfClient.SendReceiveRpc(rpc);
Console.Write(rpcResponse.OuterXml);
}
This causes the following issue:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Renci.SshNet.NetConf.NetConfSession.SendReceiveRpc(XmlDocument rpc, Boolean automaticMessageIdHandling)
at Renci.SshNet.NetConfClient.SendReceiveRpc(XmlDocument rpc)
Currently using
AutomaticMessageIdHandling = false
to bypass this issue.
Proposed fix is init'ing the _messageId in the constructor.
The text was updated successfully, but these errors were encountered:
Line 62, inappropriate usage of "_messageID" variable. This variable never had value assigned. Alternatively, you can set "automaticMessageIdHandling" to "false" and it works then
Renci.SshNet/Netconf/NetConfSession.cs -> _messageId is undefined when calling SendReceiveRpc.
The following code:
This causes the following issue:
Currently using
to bypass this issue.
Proposed fix is init'ing the _messageId in the constructor.
The text was updated successfully, but these errors were encountered: