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?
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) 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) 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).
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With