xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.44k stars 510 forks source link

tSystem.Runtime.Serialization.SerializationException detected: Error in line 1 position 216. Expecting element 'ExceptionDetail' from namespace 'http://schemas.datacontract.org/2004/07/System.ServiceModel'.. Encountered 'Element' with name 'ApiFault', namespace 'https://bingads.microsoft.com/Customer/v11'.. Thrown from: ExceptionDispatchInfo.Throw().\t0\t0\t1\tOnRetrying\tRetryPolicy\t #7957

Closed yingfangdu closed 4 years ago

yingfangdu commented 4 years ago

Steps to Reproduce

When Editor gets some fault exception from a wcf service , It will will throw the errors like this. The fault response body is like the below image, while System.ServiceModel cannot de-serialize the fault exception to the proper one on Mac which should be

FaultException<Microsoft.AdvertisingDesktop.Sync.BingAds.CustomerManagementServiceV13.ApiFault

In fact, it looks like trying to convert into

FaultException<ExceptionDetail>

Response body from the service. image

Expected Behavior

Should convert to the proper exception.

Actual Behavior

Environment

The latest Xamarin.Mac build I can get. Xamarin.Mac 6.18

Build Logs

Example Project (If Possible)

yingfangdu commented 4 years ago

It is similar issue reported here.

chamons commented 4 years ago

This issue was moved to mono/mono#18996