Search code examples
asp.net-core-mvcssl-certificateidentityserver4

identityserver4 the remote certificate is invalid because of errors in the certificate chain: untrustedroot


I am hosting my IdentityServer, Web API and MVC client apps all with IIS server, under HTTPS. When I run the my MVC client I get the following error back (note - 6009 is the port of my MVC client and 6005 is the port of my IdentityServer):

enter image description here

I am using IIS Express Development Certificate for all projects when I configure them in IIS:

enter image description here

and I copied the certificate from the personal store to the trusted root as the following:

enter image description here

and here is the details of the cert:

enter image description here

what else am I missing here?


Solution

  • You can refer to the official link,and try the commands in it.

    dotnet dev-certs https --clean
    dotnet dev-certs https --trust