SqlTableDependency Recover Connection (Reconnecting)
See original GitHub issueHi,
I working on multi user software. The app communicate withe remote database, over internet.
When internet/connection is lost with the Server:
- I need to be notified by an exception or an event. Please, how can I do that ?
- I need to recover or reconnect the server. What is the best way ?
I tried to add event as flow:
` myTableDependency.OnError += (o, e) => { MessageBox.Show(e.Error.Message, “OnError”); };
myTableDependency.OnStatusChanged += (o, e) => { MessageBox.Show(e.Status.ToString(), “OnStatusChanged”); };
`
This code didn’t handle when database connection is lost. I tested that by stoping the database service.
Thanks for your awesome work.
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
c# - SqlTableDependency reconnect in windows service
I am using SqlTableDependency https://tabledependency.codeplex.com/ in my .NET 4.5 windows service. The service is monitoring and working ...
Read more >SqlTableDependency.Extensions 3.2.0
Provides reconnection extensions for SqlTableDependency and reactive data streaming of CUD operations from MS SQL Server.
Read more >how to reconnect sql connection automatical if ...
Solution 1. The first thing you should investigate is why the connection is lost. If this is an acceptable and 'common' situation then...
Read more >SignalR Core and SqlTableDependency - Part One
Another common problem with the re-connection is that the message-id could be bigger than the message itself, due to that the re-connection ......
Read more >Reconnection failed. Try reloading the page if you're unable to ...
blazor server side auto reconnect In this tutorial we are going to update/redesign UI for showing " reconnection failed. try reloading the ...
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
Hi @kmadar75, based on @christiandelbianco suggestion I published a nuget package “originaly” named SqlTableDependency.Extensions. Example is available here: https://github.com/tomasfabian/SqlTableDependency.Extensions
Let us know pls in case of any issue
I have already subscribed to the error event as follow but it not handled it !
myTableDependency.OnError += (o, e) => { MessageBox.Show(e.Error.Message, "OnError"); };