试图访问一个WCF服务时,最新的MonoTouch 4.0问题问题、最新、WCF、MonoTouch

2023-09-03 02:41:20 作者:감정이ᅄ

我的MonoTouch的应用程序使用调用到SOAP WCF服务 CustomBinding HttpTransportBinding TextMessageEncodingBinding 和一切工作正常使用MonoTouch的版本3.2.6。我更新我的系统使用MonoTouch的版本4.0.0,并调用我的SOAP WCF服务不再工作。我不断收到 System.Net.WebException

My MonoTouch application is calling to a SOAP WCF Service using CustomBinding with HttpTransportBinding and TextMessageEncodingBinding and everything is working fine with MonoTouch version 3.2.6. I'm updating my system to use MonoTouch version 4.0.0 and the call to my SOAP WCF Service is no longer working. I keep getting the System.Net.WebException

"The remote server returned an error: 400 Bad Request"; 

什么是导致此问题,以及如何解决?

What is causing this problem, and how do I to fix it?

如果我重新安装MonoTouch的3.2.6版本一遍,然后我的应用程序工作正常,但只要我更新到MonoTouch的4.0,我碰到了同样的问题。

If I re-install MonoTouch version 3.2.6 again, then my application works correctly, but as soon as I update to MonoTouch 4.0, I run into the same problem.

推荐答案

您的问题缺少很多细节,以帮助我们来帮助你,但这里有两件事情你应该尝试:

Your question lacks many details to help us help you, but here's two things you should try:

1)条作出的WCF内部MonoTouch的3.x的一些修补程序(可惜)缺少从MonoTouch的4.x版这有可能是您的应用程序依赖于他们。如果你使用MonoTouch的4.1,那么你可以取代您的 System.ServiceModel.dll (见注释#上面的链接中6),重新构建应用程序,看看这个修复解决您的问题。

1) Some fixes made for WCF inside MonoTouch 3.x were (sadly) missing from MonoTouch 4.x. It's possible that your application depended on them. If you use MonoTouch 4.1 then you can replace your System.ServiceModel.dll (see comment #6 of the above link), rebuild your application and see if this fix solves your issue.

2)的若干修正是在对MonoTouch的4.2的HTTP协议栈做(即将推出,但大多数都不在4.1测试版)。他们不完全WCF相关,但目前还不清楚,如果您的 400 错误信息是一个WCF故障(或没有)。

2) Several fixes were made in the HTTP stack for MonoTouch 4.2 (soon to be released, but most are not in the 4.1 beta). They are not exactly WCF-related but it's not clear if your 400 error message is a WCF failure (or not).

如果两个更新不解决您的问题,那么请填写在 http://bugzilla.xamarin.com ,并附上一个自包含的测试案例,以便我们进一步调查。谢谢!

If both updates do not solve your issue then please fill a bug report at http://bugzilla.xamarin.com and attach a self-contained test case so we can investigate this further. Thanks!