web services - .NET 4.5 WCF Client Deal with bad Server? -
i have .net 4.5 client standard service reference remote windows wcf service.
sometimes, when things go horribly wrong on server, return html instead of strongly-typed response service client expects. server violate interface/contract our software adheres to.
the server not throw faultexception. not communicationexception, or else "normal". have catch{} blocks several exceptional things might happen in channel, @ loss determine how explicitly deal problem of getting html string instead of valid bits.
can how can smartly explicitly trap kind of server activity? rare happened enough wrecks wcf client behavior
thanks.
if host wcf service in iis , have in service behavior servicedebug section property includeexceptiondetailinfaults. experience problem if service throws exception derives system.exception in stead of faultexception.
you write host wcf service in windows server. response might not valid, should check includeexceptiondetailinfaults setting.
Comments
Post a Comment