本文介绍了Windows Mobile / Webservices:无法连接到远程服务器。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! Hai to all: 我是.NET CF应用程序开发的开发人员,非常感谢帮助......Hai to all:I am a developer in .NET CF application development and any help is greatly appreciated...我正在尝试开发一个可以通过Windows Mobile 6.1访问的Web服务应用程序。I am tryin to develop a web service application which could be accessed through a Windows Mobile 6.1.我在 Visual Studio 2008 中使用 Windows Mobile 6.1 Windows Mobile HTC 8900 来调试应用程序。 当我尝试通过 HTC 8900 [EDGE - Vodafone Live - India] 访问Web服务时,如果调用了WebMethod,我会收到以下错误。 但是Windows Mobile 6.0 Emulator通过使用ActiveSync 4.5来支撑设备。通过调用Web服务正常工作。I am using a Windows Mobile 6.1 Windows Mobile HTC 8900 in Visual Studio 2008 to debug the application. when I try to access the web service through the HTC 8900 [EDGE - Vodafone Live - India] i get the following error wheneve a WebMethod is invoked. But Windows Mobile 6.0 Emulator by cradling the device using ActiveSync 4.5. with calling web service is working fine. 我可以通过 http:来访问网络服务在Web浏览器中使用EDGE连接的HTC 8900设备中的//www.paceebalance.com/test/ebalncews.asmx 。如果我从程序调用它不起作用I can browse the web service by tying in http://www.paceebalance.com/test/ebalncews.asmx in the HTC 8900 Device using EDGE connection in web browser. it does not work if i called from program EVENT:GetScript (phonenumber = 1234500000,密码='',版本='0.0') 错误:无法连接到远程服务器 在System.Net.HttpWebRequest.finishGetResponse() 在System.Net.HttpWebRequest.GetResponse() 在System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest请求) 在System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) 在System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(String methodName,Object []参数,WebClientAsyncResult asyncResult) 在BusinessObjects.WebReference.EBalanceWS.GetScript(String id,String password,String version) 在BusinessObjects.Configuration.GetScript(String tempPhonenumber) 在BusinessObjects.Experiment.GetScript(String phonenumber) 在Presenter.ExperimentPresenter.GetScript(String phonenumber) 在eBalancePocketPC.PhoneWindow.Enter() eBalancePocketPC.PhoneWindow.enterButton_Click(Object sender,EventArgs e) 在System.Windows.Forms.Control.OnClick(EventArgs e) 在System.Windows.Forms.Button.OnClick(EventArgs e) 在System.Windows.Forms.ButtonBase.WnProc(WM wm,Int32 wParam,Int32 lParam) 在System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam,Int32 lParam) at Microsoft.AGL.Forms .EVL.EnterModalDialog(IntPtr hwnModal) 在System.Windows.Forms.Form.ShowDialog() 在eBalancePocketPC.IdleScreen.AcceptPhoneNumber() at eBalancePocketPC.IdleScreen.IdleScreen_Load(Object sender,EventArgs e) 在System.Windows.Forms.Form.OnLoad(EventArgs e) 在System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis) ERROR: Unable to connect to the remote server at System.Net.HttpWebRequest.finishGetResponse() at System.Net.HttpWebRequest.GetResponse() at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(String methodName, Object[] parameters, WebClientAsyncResult asyncResult) at BusinessObjects.WebReference.EBalanceWS.GetScript(String id, String password, String version) at BusinessObjects.Configuration.GetScript(String tempPhonenumber) at BusinessObjects.Experiment.GetScript(String phonenumber) at Presenter.ExperimentPresenter.GetScript(String phonenumber) at eBalancePocketPC.PhoneWindow.Enter() at eBalancePocketPC.PhoneWindow.enterButton_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam) at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) at Microsoft.AGL.Forms.EVL.EnterModalDialog(IntPtr hwnModal) at System.Windows.Forms.Form.ShowDialog() at eBalancePocketPC.IdleScreen.AcceptPhoneNumber() at eBalancePocketPC.IdleScreen.IdleScreen_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis) at System.Windows.Forms.Control.set_Visible(Boolean value) at System.Windows.Forms.Application.Run(Form fm) at eBalancePocketPC.Program.Main() 问候, VijayRegards,Vijay推荐答案 您好Vijay, 如果您在第一次失败后重试,应用程序是否会连接?如果是这样,您可能希望尝试增加超时时间。另外,你使用的是什么版本的.NET CF? HTH, NinoHi Vijay,Will the application connect if you retry after the first failure? If so, you may wish to try increasing the timeout period. Also, what version of .NET CF are you using?HTH,Nino 这篇关于Windows Mobile / Webservices:无法连接到远程服务器。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-14 00:21