MonoDroid EndpointNotFoundException

时间:2012-09-19 17:31:14

标签: web-services xamarin.android slsvcutil

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

我正在跑步 Mono for Android 4.2.6 Monotouch 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

1 个答案:

答案 0 :(得分:0)

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

似乎允许MonoTouch应用程序在Android没有的情况下工作的区别在于我在设备上运行Android应用程序(通过网络连接到Web服务),其中MonoTouch应用程序是从模拟器运行的与Web服务相同的机器。