Last post Oct 24, 2014 09:27 AM by kmcnet
Sep 18, 2014 04:50 PM|kmcnet|LINK
Hello everyone and thanks for your help in advance. I am developing a SignalR application that utilizes a SQL Server push. The application has worked intermittently on different machines. The page loads initially on the first load, but does not change
whenever the database is updated. The console says the websocket was successfully opened and has invoked notificationhub.SendNotifications, the name of the routine that initializes the SQL Dependency. This routine loads the initial pages correctly. The
service broker on the database is enabled and shows a value of 1 when the broker is queried. Beyond this, I am not experienced enough to know how to test if the notifications are being sent by SQL Server. Any help would be appreciated.
Oct 23, 2014 01:53 PM|march11|LINK
I would set up Wireshark and check out the packet data being sent. Do you have some stored procedure in you SQL db that is suppose to send out notifications? I would think that this would be done by the code or the controller which is handling the updates
to the db,.
Oct 23, 2014 02:49 PM|Siva Krishna Macha|LINK
Would SQL profiler help? See this reference:
Oct 23, 2014 07:56 PM|Ruchira|LINK
Are you starting the SqlDependency? You have to start it on the
Application_Start method of the Global.asax. Check my answer in the below thread.
Please 'Mark as Answer' if this post helps you
Oct 24, 2014 09:27 AM|kmcnet|LINK
Thank you all for the responses. I ultimately found the problem was in the structure of my query. In order for notifications to fire correctly, two part table names must be used, i.e. dbo.mytablename. Once I did this, it started working correctly. For
more information, check out the article at: