wcf - Displaying CFFaultException FaultMessage -
i've got wcf project running on our web server our mobile devices use pull data our databases.
private void getdata(string serialnum) { try { var service = new acpserviceclient(); service.getdata(serialnum); } catch (cffaultexception err) { messagebox.show(err.faultmessage, "web service error"); } } as call getdata, presented ugly xml message shown below:

i see error, buried in xml text.
procedure 'sp1_getcoilfromtable' expects parameter '@serial_number', not supplied.
why of xml being dumped faultmessage?
all of finding searching cffaultexception seems pull dead links or pages others have asked questions answer using dead links.
what clean way main error message without having write routine parse xml.
because wcf passing soap envelope exception data. it's trying nice , give might want know because wcf developed giant data pipes in mind, not being frugal , giving need.
you might able change error formatting on server side. here's msdn info: http://msdn.microsoft.com/en-us/library/vstudio/ee513227(v=vs.100).aspx
Comments
Post a Comment