System.ObjectDisposedException on a WPF Application (.NET 6)
See original GitHub issueHi
I have upgraded my Application to .NET 6, but when I try to connect a non-existing host i run in this exception ObjectDisposedException
My test code
private void Button_Click(object sender, RoutedEventArgs e)
{
try
{
var client = new SimpleTcpClient("192.168.0.50", 1234);
client.Connect();
}
catch (Exception exception)
{
}
}
The cause of the error must be somewhere here, but the error only occurs with the current .NET 6 version
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
C#/WPF app throwing a ObjectDisposedException; why am ...
The error report indicates that it's a System.ObjectDisposedException which indicates that somewhere a method's being called on a disposed ...
Read more >ObjectDisposedException Class (System)
An ObjectDisposedException is thrown when you try to access a member of an object that implements the IDisposable interface or IAsyncDisposable interface, and ......
Read more >Resolving disposed ServiceProvider throws exception - .NET
NET 6, an ObjectDisposedException is thrown when a service is resolved after the service provider has been disposed, and there's no deadlock ...
Read more >ObjectDisposedException when using Winforms ...
Hi, I am using DashboardDesigner in my WPF application by using a WindowsFormsHost control. I add a DashboardDatasource (MySql) to the ...
Read more >ObjectDisposedException in .NET Core middleware with ...
I seem to either get System.InvalidOperationException: An attempt was made to use the context while it is being configured. or System.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
now it works
Hi, yes, I just removed that in v2.5.0.2 😃 could you try it?