Product version: 13.0.0 Project: ASP.NET Core MVC & jQuery
Hi,
We're currently facing an issue with implementing chat functionality using SignalR across multiple servers, with Redis serving as the backplane for communication. Here's what we've done so far:
Uncommented the relevant code in the WebCoreModule and provided the Redis connection string. Added Microsoft.AspNetCore.SignalR.StackExchangeRedis package and configured it in the Startup.cs class of our ASP.NET Core MVC project as follows:
services.AddSignalR(o => { o.EnableDetailedErrors = true; })
.AddStackExchangeRedis(_appConfiguration["Abp:RedisCache:ConnectionString"], options =>
{
options.Configuration.ChannelPrefix = RedisChannel.Literal("ZeroChannel");
options.Configuration.ClientName = "VS2022";
});
Despite these configurations, when attempting to send a message to a user, the message doesn't appear on the sender's chat screen itself.
Could you please assist us in identifying and resolving this issue? Any insights or guidance would be greatly appreciated.
Thank you!
9 Answer(s)
-
0
Hi,
Do you see any error on browser console or server side log file (under App_Data folder named Logs.txt) ?
-
0
Hi,
Do you see any error on browser console or server side log file (under App_Data folder named Logs.txt) ?
Hi, No, I am not seeing any error in the browser console or on the Log file.
-
0
Thanks. Are you able to see messages in the Redis ? Could you query your Redis instance and see if it is delivered ?
-
0
-
0
Hi,
Could you comment out setting
ChannelPrefix
and see if that works in that case ? -
0
HI, This is my current code and it's still the same. When a sender sends messages it's not even show on his screen
services.AddSignalR(o => { o.EnableDetailedErrors = true; }) .AddStackExchangeRedis(_appConfiguration["Abp:RedisCache:ConnectionString"], options => { options.Configuration.ClientName = "VS2022"; });
-
0
Hi,
Thanks for the quick update. Does it work if you disable Redis only for SignalR ? If so, is it possible for us to test this in your project ?
-
0
Yes if I comment the code for Redis in EnterpriseBaseWebCoreModule, then it will work as normal.
Yes, you can test my project.
I havent made any changes to the source code, Just downloaded it and tried to run it.
-
0
Hi,
Thanks, please follow https://github.com/aspnetzero/aspnet-zero-core/issues/5141.