Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

273
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda