Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latest MonoTouch 4.0 problem when trying to access a WCF service

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.

like image 854
Kim Nguyen Avatar asked Apr 27 '11 07:04

Kim Nguyen


1 Answers

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!

like image 90
poupou Avatar answered Oct 29 '22 17:10

poupou