问题
In my solution I have mvc project and Identity Server3 project and I am authenticating mvc client by using Identity Server.When i start these two projects from visual studio the mvc application automatically redirects to the login page of core.Idenity server project and we can enter credentials it redirects back to mvc project.But now when i hosted these two application on two different ports on IIS server then identity server is working fine but when run the mvc project it shows The remote certificate is invalid according to the validation procedure.
I have created a self signed certificate through IIS and used it in my Identity server project and also used this same certificate as SSL certificate for both the projects when adding these sites on the IIS.And i have tried thes steps too Github link but its not working.I also have tried the certificates given in the example apps of identityserver3.
回答1:
Did you create also root certificate?
You need root certificate and a certificate signed by the root in order to pass the certificate validation of .net. You can actually make the certificate to localhost for testing (it worked for me). Here is an info how to make root certificate and a certificate signed by it:
https://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/
but the last part of merging the keys I did it differently
https://blogs.technet.microsoft.com/uclobby/2015/05/22/merge-certificate-public-and-private-key-with-openssl/
But if you are deploying, then make sure you take two certificates (one for identity server and mvc project) from the same signing authority (=> same root certificate).
Hope it helps. :)
来源:https://stackoverflow.com/questions/39362424/in-identityserver3-the-remote-certificate-is-invalid-according-to-the-validation