I have a .net 4.5 client with a standard Service Reference to a remote Windows WCF service.
Sometimes, when things go horribly wrong on the server, it will actually return HTML instead of the strongly-typed response my Service client expects. The server will completely violate the interface/contract our software adheres to.
The server does not throw a FaultException. I do not get a CommunicationException, or anything else "normal". I have catch{} blocks for several exceptional things that might happen in the channel, but I am at a loss to determine how to explicitly deal with this problem of getting an HTML string instead of valid bits.
Can anyone say how I can smartly explicitly trap this kind of server activity? It is rare but happened enough that it wrecks my WCF client behavior
Thanks.