C# Microsoft.Web.RedisessionStateProvider指定多个IP
我正在使用Microsoft.Web.RedisSessionStateProvider在Redis上存储会话信息C# Microsoft.Web.RedisessionStateProvider指定多个IP,c#,asp.net,redis,session-state,C#,Asp.net,Redis,Session State,我正在使用Microsoft.Web.RedisSessionStateProvider在Redis上存储会话信息 配置文件在下面 <!-- <add name="MySessionStateStore" host = "127.0.0.1" [String] port = "" [number] accessKey = "" [String] ssl = "false" [true|false]
配置文件在下面
<!--
<add name="MySessionStateStore"
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]
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]
/>
现在,如果出现故障,.12或.13将成为我的主节点如何处理故障转移情况。我找到了解决方案。我在这里发帖,以防任何人有类似的问题。
有两个参数可用于指定IP:
<add name="MySessionStateStore" applicationName = "testapp"
type="Microsoft.Web.Redis.RedisSessionStateProvider"
connectionString ="172.29.10.11:6379,172.29.10.12:6379,172.29.10.13:6379,ssl=false,abortConnect=False" />
我找到了解决方案。我在这里发帖,以防任何人有类似的问题。
有两个参数可用于指定IP:
<add name="MySessionStateStore" applicationName = "testapp"
type="Microsoft.Web.Redis.RedisSessionStateProvider"
connectionString ="172.29.10.11:6379,172.29.10.12:6379,172.29.10.13:6379,ssl=false,abortConnect=False" />