How do I return an HTTP 403
from a WebAPI
method? I've tried throwing an HttpResponseException
with HttpStatusCode.Forbidden
, and I've tried
return request.CreateErrorResponse(HttpStatusCode.Forbidden, pEx);
Neither of which work. Both ALWAYS return an HTTP 200
. What am I missing? It has to be something simple but I don't see it.