【问题标题】:MonoDroid EndpointNotFoundExceptionMonoDroid EndpointNotFoundException
【发布时间】:2012-09-19 17:31:14
【问题描述】:

我正在使用我使用 Microsoft 的 slsvcutil 生成的客户端代码调用 Web 服务。无论我打什么电话,我都会收到 EndpointNotFoundException。堆栈跟踪如下。该服务正在我的本地计算机上运行。我能够使用相同的生成客户端代码和相同的 Web 服务从 MonoTouch 应用程序成功地进行相同的调用。

我在跑步 适用于 Android 4.2.6 的单声道 单点触控 5.9.9.4 单声道 2.10.9

还有人看到这个吗?

System.ServiceModel.EndpointNotFoundException: A system exception has occurred. --->              System.Exception: Error: ConnectFailure (Network is unreachable) ---> System.Exception: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.ServiceModel.Channels.HttpRequestChannel+<BeginProcessRequest>c__AnonStorey7.<>m__1 (IAsyncResult r) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.ServiceModel.Channels.HttpRequestChannel+HttpChannelRequestAsyncResult.WaitEnd () [0x00000] in <filename unknown>:0
at System.ServiceModel.Channels.HttpRequestChannel.EndRequest (IAsyncResult result) [0x00000] in <filename unknown>:0
at System.ServiceModel.Channels.HttpRequestChannel.Request (System.ServiceModel.Channels.Message message, TimeSpan timeout) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Channels.Message msg, TimeSpan timeout) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Description.OperationDescription od, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0

【问题讨论】:

    标签: web-services xamarin.android slsvcutil


    【解决方案1】:

    这似乎是网络配置的结果。

    似乎允许 MonoTouch 应用程序在 Android 不支持的情况下工作的不同之处在于,我让 Android 应用程序运行在一个设备上(通过网络连接到 Web 服务),而 MonoTouch 应用程序是从一个模拟器上运行的与 Web 服务相同的机器。

    【讨论】:

      猜你喜欢
      • 2014-01-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-01
      • 2011-01-28
      相关资源
      最近更新 更多