【问题标题】:The underlying connection was closed - WEB SERVICES底层连接已关闭 - WEB SERVICES
【发布时间】:2014-08-18 11:45:04
【问题描述】:

我想通过 Web Services 连接 API

我做过这样的事情: Integration with another system

我得到同样的错误: “底层连接已关闭:接收时发生意外错误。”

我还创建了一个新类:

Class MyTestService
    Inherits SenditAPI.SendItpl
    Protected Overrides Function GetWebRequest(ByVal uri As Uri) As System.Net.WebRequest
        Dim webRequest As System.Net.HttpWebRequest
        webRequest = CType(MyBase.GetWebRequest(uri), System.Net.HttpWebRequest)
        'Setting KeepAlive to false 
        webRequest.KeepAlive = False
        GetWebRequest = webRequest
    End Function
End Class

根据http://support.microsoft.com/kb/915599

【问题讨论】:

    标签: .net vb.net web-services api


    【解决方案1】:

    好像是配置的问题。

    检查 App.config 文件。 <value>...</value> 中的地址似乎不正确。

    【讨论】:

      猜你喜欢
      • 2020-11-05
      • 1970-01-01
      • 2013-10-31
      • 2018-01-31
      • 2017-09-21
      • 2017-09-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多