Last issue with MonoTouch 4.0 when trying to access WCF service

My MonoTouch application calls the SOAP WCF Service using CustomBinding with HttpTransportBinding and TextMessageEncodingBinding , and everything works fine with MonoTouch version 3.2.6. I am updating my system to use MonoTouch version 4.0.0 and calling my WCF SOAP service no longer works. I keep getting System.Net.WebException

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

What causes this problem, and how to fix it?

If I install MonoTouch version 3.2.6 again, then my application works correctly, but as soon as I upgrade to MonoTouch 4.0, I encountered the same problem.

+6
source share
1 answer

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

1) Some fixes for WCF inside MonoTouch 3.x were (unfortunately) missing from MonoTouch 4.x. Perhaps your application depends on them. If you are using MonoTouch 4.1, you can replace System.ServiceModel.dll (see Comment # 6 above), rebuild your application, and see if this fix fixes your problem.

2) Several corrections were made in the HTTP stack for MonoTouch 4.2 (will be released soon, but most of them are not in beta 4.1). They are not entirely related to WCF, but it is unclear whether message 400 is a WCF error (or not).

If both updates do not solve the problem, please fill out the bug report at http://bugzilla.xamarin.com and attach a standalone test case so that we can investigate this further. Thanks!

+2
source

Source: https://habr.com/ru/post/886767/


All Articles