Asked by:
Client.Groups does not work on IIS 10

Question
-
User1501918204 posted
Hello there,
I'm using Client.Groups to notify all attached clients in a group about data changes. Hosting it on Kestrel everything works perfect. As I publish it on Azure, I run into the problem, that the clients do not update! So I run it on my local machine on IIS express 10 and figured out that the problem exists here also. Using Clients.All IIS express works and notifies all clients, but using Client.Groups no client is notified on IIS.
Do I need to configure something on IIS to get it work? Is there meybe a possibility to run a WebApp on Azure on Kestrel?
Regards,
Martin
Wednesday, January 13, 2016 6:58 AM
All replies
-
User614698185 posted
Hi Martin,
Welcome to ASP.NET Forums!
Using Clients.All IIS express works and notifies all clients, but using Client.Groups no client is notified on IIS.As far as I know, Clients.All broadcast any message to all the clients. But Groups in SignalR provide a method for broadcasting messages to specified subsets of connected clients. So, you should make sure you have specified its name in a call to Groups.Add. Then, you can send messages to all of the members of a group or only specified members of the group, please see this tutorial:
http://www.asp.net/signalr/overview/guide-to-the-api/working-with-groups
Best Regards,
Candice Zhou
Thursday, January 14, 2016 5:22 AM -
User1501918204 posted
Hi Candice and thanks for your welcome!
As far as I know, Clients.All broadcast any message to all the clients. But Groups in SignalR provide a method for broadcasting messages to specified subsets of connected clients.You are absolutely right and everything works as described by you running the code on Kestrel. My Problem is that the same code doing the trick on Kestrel dosen't work on IIS. Not on the Azure-Platrform nor on a local installation of the IIS Express 10. Therefore I asked if there are some configurations need to be done on IIS or if there is a possibility to run a ASP.Net WebApp on Azure on Kestrel.
Thanks for your help and regards,
Martin
Thursday, January 14, 2016 6:24 AM -
User614698185 posted
Hi Martin,
Firstly, you should make sure your IIS Express works well.
Secondly, if your application in all the IIS Express cannot use SignalR Groups, I think you could configure tracing for SignalR servers and clients. Tracing enables you to view diagnostic information about events in your SignalR application. Please see: http://www.asp.net/signalr/overview/testing-and-debugging/enabling-signalr-tracing
Best Regards,
Candice Zhou
Friday, January 15, 2016 10:40 AM -
User1501918204 posted
Hi Candice and thanks again for your reply,
I think I need to give you some more context on my problem as the link you posted does not work for me as I'm using SignalR3. I have a ASP.Net WebApp written in ASP.Net 5. I'm developing the App in VS2015 where I can debug on Kestrel or IIS Express. On Kestrel everything works fine, but publishing the WebApp to Azure, my clients does not get notified by clients.group("GroupID"). So I tried it on my local machine with the IIS Express and also here the code running on Kestrel does not work on IIS. So I activate the debugging using the following code:
// add Signalr services.AddSignalR(opt => { opt.Hubs.EnableDetailedErrors = true; });
But I don't see any error in the logfile of the IIS. It seems that the Messages to the client get swallowed by IIS. Maybe there's a problem with the current Release (3.0.0 RC1) of SignalR3?
Best Regards,
Martin
Update: I changed my code in order to use SignalR2 and voila, the notification of the Clients work in Kestrel and IIS without any problem -> for me it seems to be a bug in SignalR3.
Monday, January 25, 2016 8:03 AM -
User614698185 posted
Hi Martin,
You could refer to this link:
http://stackoverflow.com/questions/26982658/is-signalr-3-0-beta-available-yet-for-2015
Best Regards,
Candice Zhou
Tuesday, February 2, 2016 9:27 AM -
User1699461659 posted
Hello Martin,
I am facing the same issue. was your issue solved?
if yes, please let me know how did you resolve this.
Regards
Naushad Warsi
Friday, July 5, 2019 6:48 AM