title: Service on Azure AKS Client Certificate Authentication - NetCore 3.5
body: <p>I have an api on Azure Aks (Linux Bassed) that needs to make a client certificate authentication to an external service that it is not working, it just stays 1 minute without send any data and after that period the server close the connection. We can see in a network capture that the pod just make the three hand shake but it does not send any data (not body and it does not send the client certificate). But if we deploy the same code in an Azure App Service (linux based) it works fine and makes the client authentication with the remote server. Is there any specific library that needs to be install on linux pod to make the client authentication?</p>
  <p>This is the code we are using</p>
  <pre><code>private async Task&lt;string&gt; CallInvokeRestClient(object body)
  {
    try
    { 
      _urlRedeban = JsonConvert.DeserializeObject&lt;MiddlewareRBMDto&gt;(_settingsRBM.Value.MiddlewareRBM);
      var client = new RestClient(_urlRedeban.EndpointRBM);
      byte[] bytes = Convert.FromBase64String(_configuration[_configuration[&quot;TY_CERTIFICATE_TUYA&quot;]]);
      client.ClientCertificates = new System.Security.Cryptography.X509Certificates.X509Certificate2Collection();
      client.ClientCertificates.Add(new System.Security.Cryptography.X509Certificates.X509Certificate2(bytes)); 
      var request = new RestRequest(Method.POST);
      request.AddJsonBody(JsonConvert.SerializeObject(body));
      var header = CreateHeaderRedeban();
      request.AddHeaders(header);
      var response = client.Execute(request);
      if(!response.IsSuccessful)
          {
              _logger.LogError($&quot;httpclientwrapper: error: {response.ErrorException}&quot;);
              throw new Exception($&quot;Error al comunicarse con redeban&quot;);
          }
  
      return response.Content;
    }
    catch (Exception ex)
    {
      throw new Exception($&quot;It's not posibble to call the service, detail: {ex.Message.ToString()}&quot;);
    }
  }
  </code></pre>
  <p>Thanks</p>