asp.net - 条纹购买在本地工作正常,主机超时(1&1)
问题描述
我正在使用 ASP.net Framework 4.8、Visual Studio 2019 社区和 Stripe 的官方 Nuget 包 v28.8.0。
我正在使用 Stripe Elements 和我的测试密钥来创建客户并完成购买。在本地,在我的机器上,它没有问题地通过。我可以创建客户、从他们的服务器获取数据等。
当我部署到 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
它应该创建一个客户并购买一个项目,但它只是冻结并每次都超时。
解决方案
这是他们现在给我的代理服务器:
<system.net>
<defaultProxy>
<proxy usesystemdefault = "False" bypassonlocal="True" proxyaddress="http://winproxy.1and1.co.uk:3128" />
</defaultProxy>
</system.net>
推荐阅读
- bootstrap-5 - Bootstrap 5 模式不显示对话框
- altair - Altair 不同且计数未绘制预期值
- reactjs - onClick 对 Mobil View 中的按钮样式组件不起作用
- algorithm - 这种晦涩难懂的排序算法怎么叫
- javascript - 有没有办法可以遍历数组中的日期并将它们添加到这个对象?
- javascript - 自标头更新中的 OAuth 令牌以来,使用 JS 库中的 SC.Get()
- python - 追加到给定值的字符串
- python - 对数据框进行双重切片
- javascript - Mongoose - 更新并返回更新的子文档
- wix - 启动条件是否以静默模式显示?