I got the issue resolved. All I had to do is to give the right permissions to the application pool identity to access the certificate.
IIS Configurations
I have developed asp.net application.
The purpose of the application is to call a rest webservice and receive some information.
I have visual studio and IIS running on the same machine. I have installed the certificate that I received from the webservice provider on this machine.
When I run the application from within Visual studio, it works perfectly and I receive the proper response.
But when I apublish it and delopy it on IIS, it does not work and gives me error says:
"The request was aborted: Could not create SSL/TLS secure channel."
What am I missing in IIS configuration?
Windows development | Internet Information Services
Developer technologies | ASP.NET | ASP.NET API
4 answers
Sort by: Most helpful
-
-
Olaf Helper 47,441 Reputation points
2023-01-24T10:27:58.8866667+00:00 Have you also configure SSL in IIS?
-
Anonymous
2023-01-25T04:02:11.2366667+00:00 Hi @Jeddah,
Based on your description, you've mentioned that you have a certificate installed, so are you binding the certificate for this site? Just check this doc: Create an SSL Binding.
In addition, please make sure both client and server support a common SSL/TLS protocol version.
Best regards,
Xudong Peng
If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our [documentation][1] to enable e-mail notifications if you want to receive the related email notification for this thread.
-
Jeddah 86 Reputation points
2023-01-25T07:58:32.37+00:00 Looks like I was not so clear with my questin. Let me explain one more time.
In CompanyA where I work, we have an ASP.NET web application that is hosted on IIS server and binded already with CertificateA of CompanyA.
There is another Company let say CompanyB that is providing some Rest API service based on paid subscription. CompanyB provides subscribers with CertificateB and asked them to send CirtificateB along with the http request when invoking the Rest service.
I uses Restsharp package from NuGet library to achieve my goal. It works perfectly and got the proper response when I run the application from within Visual Studio. However, when I publish it on IIS and run the application I am getting error says:
"The request was aborted: Could not create SSL/TLS secure channel."
On IIS, I already configured the binding with CirtificateA.
Is there any configuration on IIS need to be done regarding CirtificateB.