我是一名 Mono Android 开发人员。
当我完成我的应用程序并部署到生产服务器时,我需要将 Web 服务更改为另一台 IIS 服务器,与测试服务器不同。
我尝试以下代码:
wfqry = new AndroidApp.WFQuery.WFQuery();
wfqry.Url = "http://192.123.123.1/APPS/WebServices/WFQ.asmx"
wfqry.Discover();
但收到错误消息
System.InvalidOperationException: The url 'http://xxxxxx/APP/WebServices/WFQ.asmx' does not point to a valid discovery document
at System.Web.Services.Discovery.DiscoveryClientProtocol.Discover (string) <IL 0x00038, 0x001ec>
at (wrapper remoting-invoke-with-check) System.Web.Services.Discovery.DiscoveryClientProtocol.Discover (string) <IL 0x00033, 0x000a3>
at System.Web.Services.Protocols.SoapHttpClientProtocol.Discover () <IL 0x00024, 0x0016f>
at (wrapper remoting-invoke-with-check) System.Web.Services.Protocols.SoapHttpClientProtocol.Discover () <IL 0x00032, 0x00083>
at test5.Activity1.OnCreate (Android.OS.Bundle) [0x0005d] in d:\TempData2\TestPrij\test5\test5\Activity1.cs:35
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.4-series/c6e52015/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Android.App.Activity.cs:1490
at (wrapper dynamic-method) object.a16901a2-0117-4e00-8013-5fc10b948c06 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
怎么了?
或者
请告诉我如何在不删除和重新添加 Web 参考的情况下轻松更改 Web 服务参考
非常感谢!