Forum Cross Platform with Xamarin

How to handle Fault in WCF Service Call

I am calling WCF service but exception is not handled by FaultException and its giving below exception details.
Can anyone please help me on this?

"Error in line 1 position 197. Expecting element 'ExceptionDetail' from namespace ''.. Encountered 'Element' with name 'UnityFault', namespace ''."

 MagicRequest req = new MagicRequest( Parameter1, Parameter2, Parameter3, Parameter4, Parameter5, Parameter6);
            MagicResponse res = new MagicResponse();
                res =
                      (asyncCallback, asyncState) =>
                          _client.BeginMagic(req, asyncCallback, asyncState),
                      (asyncResult) =>
            catch (FaultException<UnityFault> ex)
                //Exception is not coming here.
            catch (Exception ex)
                System.Diagnostics.Debug.WriteLine("Error :" + ex.ToString());
            return res;


Sign In or Register to comment.