I'm facing an issue once I want to call HttpWebRequest and error says: The request was aborted: Could not create SSL/TLS secure channel
First of all I'm working with company have high security standards, firewalls are applied.
I have three servers, Server A: My workstation. Server B: My colleague workstation Server C: Business Team Server
The code is as below for HttpWebRequest, and it is working without errors in my workstation [ working without SecurityProtocol code ] Request to URL starting with "https"
Once I deploy it to my colleague server, he got an error says:
Then I added below two lines to the code, after we deploy it again, it is working in my colleague server.
Now, once I deploy it on Business server, Non of above code is working, and we got an error: The request was aborted: Could not create SSL/TLS secure channel
Kindly note I tried the below also:
- Most important point is related to registry of server, I changed values of my workstation registry of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols to be same as my colleague server, then I got same error that he faced which is "the client and server cannot communicate, because they do not possess a common algorithm", once I added the code that he added "securityProtocol", then code is working fine..
I tried to change the values of Business Team server, to be same as my workstation registry values, but still we are getting same error of "The request was aborted: Could not create SSL/TLS secure channel"
Registry of Business team server values:
The values as below:
TLS1.0 Client DisabledByDefault 1 Enabled 0 Server DisabledByDefault 1 Enabled 0
TLS1.1 Client DisabledByDefault 0 Enabled 0 Server DisabledByDefault 0 Enabled 1
TLS1.2 Client DisabledByDefault 0 Enabled ffffffff Server DisabledByDefault 1 Enabled ffffffff
Please help, I don't know if I need to add extra code, or the error shown up related to configuration from server??