Salesforce Authentication Failing

前端 未结 11 1555
南方客
南方客 2020-11-30 19:05

I am trying to use OAuth authentication to get the Salesforce Authentication Token, so I referred wiki docs, but after getting authorization code, when I make a Post request

11条回答
  •  生来不讨喜
    2020-11-30 19:37

    Salesforce is requiring an upgrade to TLS 1.1 or higher by July 22, 2017 in order to align with industry best practices for security and data integrity: from help.salesforce.com.

    try to add this code:

    System.Net.ServicePointManager.SecurityProtocol = 
    SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
    

    Another option is to edit your registry:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
    "SchUseStrongCrypto"=dword:00000001
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
    "SchUseStrongCrypto"=dword:00000001
    

    Check this link for more detailed answers: Default SecurityProtocol in .NET 4.5

提交回复
热议问题