I have added the nuget package Microsoft.AspNet.SignalR.Redis to my project to allow me to scale out my signalR application using the redis cache backplane following instructions at:
http://www.asp.net/signalr/overview/performance/scaleout-with-redis
I have setup a redis cache server on Azure and everything is working perfectly using a non-secure connection to port 6379.
I now want to enable SSL for added security but there doesn't seem to be any support for SSL connections using the nuget plugin:
If I try using the secure port 6380, the nuget package doesn't seem to support SSL connections.
Example:
GlobalHost.DependencyResolver.UseRedis("redis-server.cloudapp.net", 6380,
"Password/Key", "ChatApp")
These is no switch to enable SSL
Here is the full code to connect:
public class Startup
{
public void Configuration(IAppBuilder app)
{
// Configuration for scale out using Redis:
var redisEnabled = Convert.ToBoolean(WebConfigurationManager.AppSettings["RedisScaleOut_Enable"]);
if (redisEnabled)
{
var redisHost = WebConfigurationManager.AppSettings["RedisScaleOut_Host"];
var redisPort = Convert.ToInt16(WebConfigurationManager.AppSettings["RedisScaleOut_Port"]);
var redisPassword = WebConfigurationManager.AppSettings["RedisScaleOut_Password"];
var redisAppName = WebConfigurationManager.AppSettings["RedisScaleOut_AppName"];
GlobalHost.DependencyResolver.UseRedis(redisHost, redisPort, redisPassword, redisAppName);
}
// Branch the pipeline here for requests that start with "/signalr"
app.Map("/signalr", map =>
{
// Setup the CORS middleware to run before SignalR.
// By default this will allow all origins. You can
// configure the set of origins and/or http verbs by
// providing a cors options with a different policy.
map.UseCors(CorsOptions.AllowAll);
var hubConfiguration = new HubConfiguration
{
// You can enable JSONP by uncommenting line below.
// JSONP requests are insecure but some older browsers (and some
// versions of IE) require JSONP to work cross domain
EnableJSONP = true
};
// Run the SignalR pipeline. We're not using MapSignalR
// since this branch already runs under the "/signalr"
// path.
map.RunSignalR(hubConfiguration);
});
}
}