本文介绍了无法解析远程名称:"api-3t.sandbox.paypal.com"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在电子商务网站中使用Paypal NVP api.之前它运行良好,但现在抛出"System.Net.WebException: The remote name could not be resolved: 'api-3t.sandbox.paypal.com'"异常.我也尝试了api.sandbox.paypal.com,但没有运气.有任何想法吗?

I am using paypal NVP api in an ecommerce website. It was working fine before but now it is throwing "System.Net.WebException: The remote name could not be resolved: 'api-3t.sandbox.paypal.com'" Exception. I also tried api.sandbox.paypal.com but no luck. Any ideas?

谢谢

更新:如果我的客户端从他的系统中运行它,则相同的代码也可以工作.

Update : Same codes works if my client runs it from his system.

推荐答案

这是DNS问题,或者至少是例外所指的问题.运行您的代码但失败的计算机无法将主机名"api-3t.sandbox.paypal.com"解析为IP地址.

This is a DNS problem, or at least, that's what the exception points to. The machine that is running your code, and failing, is not able to resolve the hostname 'api-3t.sandbox.paypal.com' to an IP address.

按可能性顺序排列的潜在问题:

Potential problems, in order of likelyhood:

  • 您的计算机未正确配置DNS服务器.
  • 您的计算机正在使用DNS服务器来过滤查询.
    • 这在公司环境中很常见;进行了过滤以尝试阻止恶意软件的运行.
    • Your machine does not have a DNS server configured properly.
    • Your machine is using a DNS server that filters queries.
      • This is common in corporate environments; filtering is done to try to stop malware from working.
      • 这是典型的仅授权" DNS服务器.

      您可以在该计算机上启动命令提示符,然后查看正常的DNS解析是否有效:

      You could fire up a command prompt on that machine and see if normal DNS resolution works:

      c:\>nslookup api-3t.sandbox.paypal.com
      Server:  google-public-dns-a.google.com.
      Address:  8.8.8.8
      
      Non-authoritative answer:
      Name:    api-3t.sandbox.paypal.com
      Address:  173.0.82.83
      

      如果您想绕过您机构的DNS服务器进行测试,则可以将计算机重新配置为使用Google的公共DNS服务器8.8.8.8.

      If you want to try to bypass your institution's DNS server for testing, you can reconfigure your computer to use Google's public DNS server, 8.8.8.8.

      这篇关于无法解析远程名称:"api-3t.sandbox.paypal.com"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 22:31
查看更多