Good morning all,
I need to replace AppFabric for Redis in an app park with many components and multiple web pages. And my job is to make this change with the least possible impact on applications code.
I use
FOR Server Cache
////Connection... SSL REDIS6
ConfigurationOptions options = new ConfigurationOptions()
{
EndPoints = { { "MyNLB", 6379 } },
Ssl = true,
SslProtocols = SslProtocols.Tls12,
Password = "MyPassword"
};
options.CertificateValidation += CheckServerCertificate; // <--- here it is the delegate who verifies the certificate ...
using (ConnectionMultiplexer redisConn = ConnectionMultiplexer.Connect(options))
{
// <<<<< CONNECTED >>>>>
IDatabase db = redisConn.GetDatabase();
//My commands GET / SET / ETC..
}
// <<<<< DISCONNECTED >>>>>
FOR Session Cache
I use
In the Web.Config file
<add name="MySessionStateStore"
type="Microsoft.Web.Redis.RedisSessionStateProvider"
host="MyNLB"
port="6379"
accessKey="MyPassword"
ssl="true"
protocol="tls12" />
Here I have a problem, I don't know how to perform my certificate validation. Should I use the IIS Initialize to create my connection with certificate validation? - Be careful, I don't want to change the code of the web pages.
How do I do that? Is it possible?
Thanks,
Frankie