I am using the WCF REST Service Template 40(CS). I am throwing WebFaultExceptions as such:
throw new WebFaultException(\"Error Message\", HttpStatu
When WebHttpBehavior.FaultExceptionEnabled
is set to true
, WebFaultException
will result in a 200 response with the fault rendered as XML and not JSON, despite the automaticFormatSelectionEnabled
configuration setting or response format attribute settings. The MSDN documentation does not mention this and is misleading in that it states that this property is only related to the 500 response code.