Click here to Skip to main content
15,792,870 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Configuring TLS 1.2 on windows 2012 R2 server
used this method below in global.asax file still not working. As my project is MVC 4.5.1 and on the server side no SHA certificate is installed. Does the certificate comes free with windows 2012 R2 server or do i have to buy it and how can the certificate be used with TLS 1.2 or are they independent for integration. As i want to integrate TLS 1.2 for payment integration purposes on the website as they said the payment gateway requires on server side TLS 1.2. I don't want to make changes on the regedit on the server side for TLS 1.2 any method within project would be appreciated.

What I have tried:

ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3
                                        | System.Net.SecurityProtocolType.Tls
                                        | System.Net.SecurityProtocolType.Tls11
                                        | System.Net.SecurityProtocolType.Tls12;
Updated 6-Jan-17 7:31am

1 solution

You need to install a certificate for your URL to the server and bind it to the application in IIS. You can purchase one or try to get one free from Let's Encrypt - Free SSL/TLS Certificates[^].

You can generate a self-signed certificate on the server, but that will show to users as an invalid certificate, so there's no point to that outside of testing.

You will not be able to provide SSL/TLS until you have done this.

This also is not a code issue, this is an operational one. Changes to code will not help you here.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900