我正在尝试将 ASP.NET 会话状态存储在缓存中(用于 redis 的 Azure 缓存),如此处所述https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-aspnet-会话状态提供者
但是,我收到以下错误。
UnableToConnect on mydomain.redis.cache.windows.net:6379/Interactive,来源:ResetNonConnected,输入缓冲区:0,未完成:0,最后读取:5 秒前,最后写入:5 秒前,未回答写入:1106595 秒前, keep-alive: 60s, pending: 0, state: Connecting, last-heartbeat: never, last-mbeat: -1s ago, global: 5s ago, mgr: Inactive, err: never StackExchange.Redis.RedisConnectionException: UnableToConnect on mydomain .redis.cache.windows.net:6379/Interactive,来源:ResetNonConnected,输入缓冲区:0,未完成:0,上次读取:5 秒前,上次写入:5 秒前,未回答写入:1106595 秒前,保持-活着:60s,待处理:0,状态:正在连接,最后一次心跳:从不,最后一次 mbeat:-1s 前,全局:5s 前,mgr:不活动,err:从不
<add name="AzureRedisCacheConnection" connectionString="mydomain.redis.cache.windows.net:6379,password=password=,ssl=False,abortConnect=False"/>
</connectionStrings>
<sessionState mode="Custom" customProvider="AzureCacheForRedisProvider">
<providers>
<!-- For more details check https://github.com/Azure/aspnet-redis-providers/wiki -->
<!-- Either use 'connectionString' OR 'settingsClassName' and 'settingsMethodName' OR use 'host','port','accessKey','ssl','connectionTimeoutInMilliseconds' and 'operationTimeoutInMilliseconds'. -->
<!-- 'throwOnError','retryTimeoutInMilliseconds','databaseId' and 'applicationName' can be used with both options. -->
<!--
<add name="AzureCacheForRedisProvider"
host = "127.0.0.1" [String]
port = "" [number]
accessKey = "" [String]
ssl = "false" [true|false]
throwOnError = "true" [true|false]
retryTimeoutInMilliseconds = "5000" [number]
databaseId = "0" [number]
applicationName = "" [String]
connectionTimeoutInMilliseconds = "5000" [number]
operationTimeoutInMilliseconds = "1000" [number]
connectionString = "<Valid StackExchange.Redis connection string>" [String]
settingsClassName = "<Assembly qualified class name that contains settings method specified below. Which basically return 'connectionString' value>" [String]
settingsMethodName = "<Settings method should be defined in settingsClass. It should be public, static, does not take any parameters and should have a return type of 'String', which is basically 'connectionString' value.>" [String]
loggingClassName = "<Assembly qualified class name that contains logging method specified below>" [String]
loggingMethodName = "<Logging method should be defined in loggingClass. It should be public, static, does not take any parameters and should have a return type of System.IO.TextWriter.>" [String]
redisSerializerType = "<Assembly qualified class name that implements Microsoft.Web.Redis.ISerializer>" [String]
/>
-->
<add name="AzureCacheForRedisProvider" type="Microsoft.Web.Redis.RedisSessionStateProvider"
connectionString="AzureRedisCacheConnection"
/>
</providers>
</sessionState> ````
What am I missing here?