c# - Are FaultExceptions handled differently in .NET 4 than in .NET 4.5? -
we experiencing different behavior on our clients when handling faultexceptions thrown our wcf service depending on version of .net framework.
the service defines custom fault:
[datacontract] public class myfault { [datamember] public int myid { get; set; } }
the interface of service:
[servicecontract] public interface imyservice { [operationcontract] [faultcontract(typeof(myfault))] myresponse dosomething(myrequest request); }
the client handles exception:
try { client.dosomething(myrequest); } catch (faultexception<myfault> ex) { ... }
on .net 4.5 machine recognise fault faultexception<myfault>
, handle expected.
however, on .net 4 machine treat fault faultexception
(non-generic), catch never reached.
we captured traffic on machines see if there differences in communication. both, request , response identical. updated .net 4 machine .net 4.5 (without updating other software or our client software) , behavior changed.
is there logical explanation?
Comments
Post a Comment