Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

268
Views
Redis - IIS8 - How to valide the Certificate (Session Cache)

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

  • Redis 6 (in a cluster of 3 servers with an NLB in front);
  • Framework 4.8;
  • StackExchange.Redis 2.2.4 or +;
  • Connection with certificate validation;
  • I'm not on Azure;

FOR Server Cache

  • The server cache is operated with a common component, the encapsulation here makes it easy to reduce the impact;
  • The following code work perfectly to replace AppFabric for the connection;
////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

  • IIS8;

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

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!