【问题标题】:Why am I getting "Unable to read data from the transport connection"为什么我收到“无法从传输连接读取数据”
【发布时间】:2014-03-11 16:18:22
【问题描述】:

我的数据库中的地址很少(~100)。我想检索所有地址的经纬度信息。 我参考了khellang 的答案来获取地址的纬度和经度。 我在一次运行中获得了单个地址的纬度和经度。 但是当我使用 for 循环获取地址一的纬度和经度时,我收到异常为“System.IO.IOException: Unable to read data from the transport connection: The connection was closed.”一个。 这背后的原因可能是什么。 我正在为此制作一个 C# 控制台应用程序。它应该是 Web 应用程序还是 Web 服务应用程序。错误背后的原因是使用控制台应用程序。 我只是这方面的初学者。

【问题讨论】:

    标签: c# google-maps geolocation latitude-longitude


    【解决方案1】:

    我解决了我的问题。我只是换了一行:

    var locationService = new GoogleLocationService();
    

    到

    var locationService = new GoogleLocationService(true); //use Https
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-02-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-15
      相关资源
      最近更新 更多