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
That the RemoteDesktop Connect method works without errors.
Current Behavior
When using VNCSharp this method was working fine but the performance was very bad. I upgraded my project to .NET Core 8.0 and used VNCSharpCore instead.
// Create a new RemoteDesktop control
RemoteDesktop newRd = new RemoteDesktop();
vncPanel.Controls.Add(newRd); // Add the new control to the panel
newRd.Dock = DockStyle.Fill;
try
{
// Connect
newRd.Connect(ipAddress, true, true); // Adjust parameters as needed
// Optionally, handle disconnections or other events here
newRd.ConnectionLost += (sender, e) =>
{
MessageBox.Show("Connection lost.");
};
}
catch (Exception ex)
{
MessageBox.Show($"Failed to connect: {ex.Message}"); //fails here with the error in the title.
}
Possible Solution
I need to know what this Parameter 'stream' is so I can fix it.
Steps to Reproduce (for bugs)
Not sure as it's specific to our environment.
Context
Trying to make a grid of all our Linux devices where all VNC Clients are visible in the grid in real time over a local network at 1 Gbps.
Your Environment
VNC Servers are running on Linux, client can simply connect with IP address.
The text was updated successfully, but these errors were encountered:
I have the same error trying to use this in a VB app. I also have upgraded to .NET 8.0 and VNCSharpCore instead of the unmaintained VNCSharp. I just have one RemoteDesktop control on a form.
Here's the code I use to connect to the server:
Public Sub Connect()
Dim vncex As VncProtocolException
Dim oex As Exception
' As long as they didn't click Cancel, try to connect
If (Not PiHost = Nothing) Then
Me.Instance.Invoke(Sub()
Try
RemoteDesktop1.GetPassword = New VncSharpCore.AuthenticateDelegate(AddressOf GetPassword)
Me.RemoteDesktop1.Connect(PiHost)
BackgroundWorker1.WorkerReportsProgress = True
BackgroundWorker1.ReportProgress(100)
Catch vncex
If vncex.HResult = "-2146232832" Then
'VNC not running yet, so try sleeping for a bit
Else
MsgBox("Error " & vncex.HResult & ": " & vncex.Message)
End If
Exit Try
Catch oex
MsgBox(oex.Message)
End Try
End Sub)
End If
End Sub
Once I click OK to the "Value cannot be null" error, VS gives an error:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
at the last line in this part of the VNCSharp code:
Expected Behavior
That the RemoteDesktop Connect method works without errors.
Current Behavior
When using VNCSharp this method was working fine but the performance was very bad. I upgraded my project to .NET Core 8.0 and used VNCSharpCore instead.
// Create a new RemoteDesktop control
RemoteDesktop newRd = new RemoteDesktop();
vncPanel.Controls.Add(newRd); // Add the new control to the panel
newRd.Dock = DockStyle.Fill;
try
{
// Connect
newRd.Connect(ipAddress, true, true); // Adjust parameters as needed
// Optionally, handle disconnections or other events here
newRd.ConnectionLost += (sender, e) =>
{
MessageBox.Show("Connection lost.");
};
}
catch (Exception ex)
{
MessageBox.Show($"Failed to connect: {ex.Message}"); //fails here with the error in the title.
}
Possible Solution
I need to know what this Parameter 'stream' is so I can fix it.
Steps to Reproduce (for bugs)
Not sure as it's specific to our environment.
Context
Trying to make a grid of all our Linux devices where all VNC Clients are visible in the grid in real time over a local network at 1 Gbps.
Your Environment
VNC Servers are running on Linux, client can simply connect with IP address.
The text was updated successfully, but these errors were encountered: