6

I am currently hosting my redis cache server on Azure, and have signalR relying on it as the backbone using the following...

GlobalHost.DependencyResolver.UseRedis("Server",port,"password","eventKey");

This works find on port 6379 (non-SSL) but my chat app breaks when I try to connect to the SSL port (6380) of my Azure Redis server, and the hub is never started. What could be the cause of this issue? Or am I doing something wrong?

This is the error that appears on /signalr/connect in my browser net::ERR_CONNECTION_RESET

Todd
  • 175
  • 7

3 Answers3

17

You can try this: GlobalHost.DependencyResolver.UseRedis(new RedisScaleoutConfiguration(connectionString, "YourServer"));

And connection string something like:

connectionString="yourNameHere.cache.windows.net,ssl=true,password=YourPasswordKey"

Make sure you are using SignalR built with StackExchange.Redis (latest is gratest ;)

Michael Parshin
  • 345
  • 2
  • 5
  • Nice! I actually did actually get it to work that day using the same exact method you have outlined above. Upgraded all SignalR packages, and was able to use a connection string directly! The following post led me to that solution: https://github.com/SignalR/SignalR/issues/3383 – Todd Apr 13 '15 at 17:14
  • you might want to add a port number to your connection string. e.g. "yourServerNameHere.cache.windows.net:yourPortNumberHere,ssl=true,password=YourPasswordKey" – samneric May 03 '17 at 19:22
1

I upgraded the signalr core library to version 2.2.3.0 and used the below syntax, works like a charm.

var redisServer = ConfigurationManager.AppSettings[Constants.RedisServer].ToString();

var redisServerPassword = ConfigurationManager.AppSettings[Constants.RedisServerPassword].ToString();

var connectionString = $"{redisServer},password={redisServerPassword},ssl=True,abortConnect=False";
GlobalHost.DependencyResolver.UseRedis(new RedisScaleoutConfiguration(connectionString, "APIIdentifierString"));
Re Captcha
  • 3,125
  • 2
  • 22
  • 34
0

In case anyone else hits the issue, it seems that the default connection string provided by the Azure portal contains abortConnect=False. Once I've removed that part, things started working for me.

Ash Saf
  • 162
  • 9