Last post Mar 03, 2017 10:23 AM by Rajesh Mishra
Mar 01, 2017 07:21 AM|Rajesh Mishra|LINK
My application is Web Forms Application, where everything is a Web API call. Now I have a typical server to client notification requirement.
My web api will receive a call, like Stop/Start, which has to notify UI to perform action.
Is it possible?
Mar 01, 2017 11:10 AM|kaushalparik27|LINK
How are you calling Web API? Are you using jQuery Ajax to call? Also how/when do you want to show notification? Is it immediately after calling Web API?
Mar 01, 2017 11:21 AM|PatriceSc|LINK
You could use web api to "post" a notification message to a queue. The web app would take notifications from this queue (either on the next UI refresh or by polling or using SignalR depending on the feature and how much work you can put into it).
Mar 02, 2017 05:49 AM|Rajesh Mishra|LINK
I am using Angular to make AJAX calls. Yeah, I would want to show real time notifications. Basically, I need to block some UI elements with some message.
The area I am facing Issue is to transfer the message from Web API to Asp.net Web Forms Web Server (where my SignalR is sitting).
Mar 02, 2017 05:53 AM|Rajesh Mishra|LINK
The web app would take notifications from this queue (either on the next UI refresh or by polling or using SignalR depending on the feature
How would the web app take notifications from Queue using SignalR?
I know of this approach where I can WAITFOR message to be dropped in the Queue but does not want to go that way.
Mar 03, 2017 09:14 AM|Jean Sun|LINK
You can start SignalR from the following link.
Mar 03, 2017 09:32 AM|PatriceSc|LINK
Blocking UI elements in real time based on messages ??? The big picture might help. For example you are not trying to replace optimistic locking ?
So my understanding is that you have a web api site which is separate from the web forms site where SignalR is sitting and so you'll need some way to transmit this message between the web api and the web forms site.
If I have control on both sites in my own company my first move would be liekly to write those messages to a db and have SignalR to look for this db using for example
https://www.codeproject.com/articles/883702/real-time-notifications-using-signalr-and-sql-depe to at least have something up and running quite quickly and see if the overall concept works fine.
Then you should always be able to replace just this part with something else if overall architecture is in place. The critical part is likely more to carefully weight if locking a UI in real time does worth.
Mar 03, 2017 10:23 AM|Rajesh Mishra|LINK
Blocking in UI means a notification only. Basically, there are different web applications which lets say Start and Stop a job. And there is a app say T which has to be notified if there is a job Start from any of other applications. Then the UI notification
comes in saying ex "Job Started from app x or y". This all is user specific.
Past few days, I have been looking for approaches. This same approach is what suits my thing. SQL dependecy + SignalR.
Only thing left for me think is about Load Balancing. Each time user logs in I need to store data like userid, connectionId, webappName, etc..
I know about SQL BackPlane. But wondering the above mentioned data will be in one of the servers, it wont persist after app pool recycle. If I could save this somehow in SQL BackPlane itself, it would be great.
Any way I can do that? I can explain in more detail. Let me know.