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
I'm trying to use your library and push changes using signalR but it's not triggering the changes any idea why?
getting following error
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
on line _sqlDependency.Start();
public class SignalServer : Hub
{
public readonly TestController _testController;
public IConfiguration Configuration { get; }
public SqlDependencyEx _sqlDependency;
public SignalServer(TestController testController, IConfiguration configuration)
{
Configuration = configuration;
_testController = testController;
SqlDependencyEx _sqlDependency = new SqlDependencyEx(Configuration.GetConnectionString("DefaultConnection"), "PCFStatus", "apps");
}
public async void NotifyConnection()
{
await Clients.All.SendAsync("TestBrodcasting", _testController.GetAllApps());
_sqlDependency.Start();
if (_sqlDependency != null)
{
_sqlDependency.TableChanged += OnDataChange;
}
}
private async void OnDataChange(object sender, SqlDependencyEx.TableChangedEventArgs e)
{
await Clients.All.SendAsync("TestBrodcasting", _testController.GetAllApps());
}
}
The text was updated successfully, but these errors were encountered:
I'm trying to use your library and push changes using signalR but it's not triggering the changes any idea why?
getting following error
on line
_sqlDependency.Start();
The text was updated successfully, but these errors were encountered: