I am seeing a protected memory exception when connecting to device.
```
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
at Renci.SshNet.Common.SemaphoreLight.Wait()
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()
at nls.protocols.ssh.SshTerminal.InsureConnectionOpen() in d:\NLS\protocols\ssh\SshTerminal.cs:line 111
at nls.protocols.ssh.SshTerminal.GetCommandResults(String commandText) in d:\NLS\protocols\ssh\SshTerminal.cs:line 80
at nls.protocols.ssh.Ssh.IdentifyDevice(SshTerminal terminal) in d:\NLS\protocols\ssh\ssh.cs:line 135
at nls.protocols.ssh.Ssh.ProcessHostData(XmlDocument sshData, Host host) in d:\NLS\protocols\ssh\ssh.cs:line 226
at nls.lib.discoveryAgent.SingleDeviceProtocol.<>c__DisplayClass1.<ProcessHost>b__0() in d:\NLS\lib\discoveryAgent\SingleDeviceProtocol.cs:line 24
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
```
Comments: ** Comment from web user: olegkap **
```
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
at Renci.SshNet.Common.SemaphoreLight.Wait()
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()
at nls.protocols.ssh.SshTerminal.InsureConnectionOpen() in d:\NLS\protocols\ssh\SshTerminal.cs:line 111
at nls.protocols.ssh.SshTerminal.GetCommandResults(String commandText) in d:\NLS\protocols\ssh\SshTerminal.cs:line 80
at nls.protocols.ssh.Ssh.IdentifyDevice(SshTerminal terminal) in d:\NLS\protocols\ssh\ssh.cs:line 135
at nls.protocols.ssh.Ssh.ProcessHostData(XmlDocument sshData, Host host) in d:\NLS\protocols\ssh\ssh.cs:line 226
at nls.lib.discoveryAgent.SingleDeviceProtocol.<>c__DisplayClass1.<ProcessHost>b__0() in d:\NLS\lib\discoveryAgent\SingleDeviceProtocol.cs:line 24
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
```
Comments: ** Comment from web user: olegkap **
Is this behavior consistent?
Where do you run it? What environment, OS etc' ?
Thanks,
Oleg