我正在使用 ASP.net 框架4.8,Visual Studio 2019社区,以及Stripe的官方Nuget软件包v28.8.0。
我正在使用带有测试键的条带元素来创建客户并完成购买。在本地,在我的机器上,它可以毫无问题地通过。我可以创建客户,从他们的服务器获取数据等。
当我部署到 1&1 并尝试使用 Stripe 做任何事情(除了在页面上加载元素(时,它会给我这个错误:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 34.200.47.89:443
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 34.200.47.89:443]
System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) +923
System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) +84
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) +259
[WebException: Unable to connect to the remote server]
System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context) +579
System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar) +107
它应该创建一个客户并购买单个项目,但它每次都会冻结并超时。
在支持在线一个小时后,他们通过电子邮件将此编辑发送到我的 Web.config 文件中,并修复了所有问题。
<system.net>
<defaultProxy>
<proxy usesystemdefault = "False" bypassonlocal="False" proxyaddress="http://ntproxyus.lxa.perfora.net:3128" />
</defaultProxy>
</system.net>
这是他们现在给我的代理服务器:
<system.net>
<defaultProxy>
<proxy usesystemdefault = "False" bypassonlocal="True" proxyaddress="http://winproxy.1and1.co.uk:3128" />
</defaultProxy>
</system.net>