The remote name could not be resolved: 'api-3t.sandbox.paypal.com'

匆匆过客 提交于 2019-12-11 02:53:35

问题


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?

Thanks

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


回答1:


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:

  • 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.
  • Your machine does have a DNS server configured, however, that server may refuse to perform recursive querys
    • This is typical of 'authoritative-only' DNS servers.
  • Your code is somehow misusing the local DNS query API.
  • Paypal's DNS servers are broken.

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

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.



来源:https://stackoverflow.com/questions/23522306/the-remote-name-could-not-be-resolved-api-3t-sandbox-paypal-com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!