无法使用 SSL 连接到 Azure Redis 缓存

Unable to connect to Azure Redis Cache with SSL

像这样连接到 Azure Redis 缓存,在 Owin 应用程序启动时...

var options = ConfigurationOptions.Parse(cacheConnectionString);
var kernel = new StandardKernel();
kernel.Bind<ConnectionMultiplexer>().ToMethod(context =>
{
    return ConnectionMultiplexer.Connect(options);
}).InSingletonScope();

这对我本地机器上的 Redis 运行 或关闭 SSL 的 Azure Redis 来说绝对没问题。但是,一旦我更改了连接字符串:

xyz.redis.cache.windows.net,ssl=false,password=abcdefghxyz=

xyz.redis.cache.windows.net,ssl=true,password=abcdefghxyz=

它抛出:

It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. UnableToResolvePhysicalConnection on PING

我正在使用来自 NuGet 的 StackExchange.Redis 版本 1.0.316.0。我试过了...

虽然现在我完全不知道可能出了什么问题。希望这是我错过的微不足道的事情,但就是看不到它!

编辑
我 运行 ConnectToAzure() 单元测试,传入我的缓存名称和密码,它通过了。所以我几乎可以肯定在这里做了一些愚蠢的事情。

编辑 2
它也适用于控制台应用程序,没有任何问题。

我解决了它,超级奇怪的情况,但我会回答以防其他人和我一样困惑。

该项目以前是 Azure 云服务中的 Web 角色,启用了角色内缓存。我们将其移至独立的 Azure Web 应用程序,但从未抽出时间删除所有遗留的不必要引用。

删除 Microsoft.WindowsAzure.ServiceRuntimeMicrosoft.WindowsAzure.Diagnostics 奇迹般地让它工作了。