0

My ASP.NET Core 6 Web API uses IdentityServer4 as idp. It works just fine when the idp runs in development mode.

When I set the idp to run in Production mode by setting the ASPNETCORE_ENVIRONMENT in web.config, the idp always fails to start.

The system event shows the error:

A fatal error occurred while creating a TLS client credential. The internal error state is 10011

The strange thing is that, if it is TLS related, why does development mode work, but Production doesn't, everything else being exactly the same? Any ideas?

UPDATE Here is the web.config file. As you can see, the Production mode is set, and this is when the IDS false. It works fine when it is set to Development. enter image description here

9
  • Have you provided and setup a valid HTTPS certificate in production? HTTPS is requirement for IdentityServer to work, otherwise you will have cookie problems. Commented Mar 14 at 14:26
  • Yes, we do. We run the app in Development mode under HTTPS all the time and without any issues. It's just when we switch to Production mode we get the error.
    – Alexu
    Commented Mar 19 at 19:43
  • can you share some code? web.config??? are you using IIS? Commented Mar 19 at 20:19
  • Thanks Tore for looking into this. I have shared my web.config above. What else should I share?
    – Alexu
    Commented Mar 19 at 21:26
  • why is the process path to \bin\debug...? why deploy debug builds to production? what does the ASP.NET Core log say? Commented Mar 20 at 6:35

0

Browse other questions tagged or ask your own question.