Asp.net “我如何调试?”;无法连接到远程服务器";将PayPal模式设置为';安全测试沙箱';?

Asp.net “我如何调试?”;无法连接到远程服务器";将PayPal模式设置为';安全测试沙箱';?,asp.net,paypal,Asp.net,Paypal,我正在使用。它一直运行良好,直到我尝试在“实时”web服务器上进行测试,我将模式设置为“安全测试沙盒” <paypal> <settings> <!-- Replace the mode to `security-test-sandbox` to test if your server supports TLSv1.2. For more information follow README instructions.-->

我正在使用。它一直运行良好,直到我尝试在“实时”web服务器上进行测试,我将模式设置为“安全测试沙盒”

  <paypal>
    <settings>
      <!-- Replace the mode to `security-test-sandbox` to test if your server supports TLSv1.2. For more information follow README instructions.-->
      <add name="mode" value="security-test-sandbox" />
…引发此错误:

PayPal.PayPaleException:重试1次。。。。PayPal.HttpConnection.Execute()中出现异常。查看日志以了解更多详细信息

问题是日志没有给我任何有用的信息,只是“无法连接到远程服务器”:

2017-02-10 17:32:41114[10]调试PayPal.Api.PayPalResource[(空)] 内容类型:application/x-www-form-urlencoded

2017-02-10 17:32:41130[10]调试PayPal.Api.PayPalResource[(空)] 用户代理:PayPalSDK/PayPal NET SDK 1.8.0 (lang=DOTNET;v=4.5.1;clr=4.0.30319.42000;bit=64;os=Microsoft Windows 新界6.3.9600.0)

2017-02-10 17:32:41130[10]调试PayPal.Api.PayPalResource[(空)] 授权:基本QVV…MT3A=

2017-02-10 17:32:41130[10]调试PayPal.Api.PayPalResource[(空)] PayPal请求Id:9dc50c0e-e836-4a5d-a9c6-c6894c839c42

2017-02-10 17:32:42594[10]错误PayPal.Api.HttpConnection[(空)] 无法连接到远程服务器

2017-02-10 17:32:42594[10]调试PayPal.Api.HttpConnection[(空)] 连接到服务器时出现问题:ConnectFailure

我已经使用自签名证书和cloudflare在web服务器上设置了HTTPS

安全性应该足以连接到PayPal,但我仍然无法连接

我在IIS中启用了对FailedReqLogFiles的日志记录,尽管有一个失败请求的条目,但在日志的“错误和警告”部分中显示“未找到任何错误或警告”


如何找出问题所在?

'security-test-sandbox'模式不再受支持()

将模式设置为“活动”或“沙箱”将按预期工作

    // Returns APIContext object
    public static APIContext GetApiContext()
    {
        // ### Api Context
        // Pass in a `APIContext` object to authenticate 
        // the call and to send a unique request id 
        // (that ensures idempotency). The SDK generates
        // a request id if you do not pass one explicitly.

        var config = getConfig();

        var tokenCredential = new OAuthTokenCredential(clientId, clientSecret, config);
        string accessToken = tokenCredential.GetAccessToken();// this errors