Bir HTTP 403'ü bir WebAPI yönteminden nasıl döndürebilirim? Ben HttpStatusCode.Forbidden ile HttpResponseException atma denedim ve ben WebAPI yönteminde HTTP 403 döndürüyor
return request.CreateErrorResponse(HttpStatusCode.Forbidden, pEx);
denedim Ne tanesi çalışma. Her iki ALWAY, bir HTTP 200 döndürür. Ne eksik? Basit bir şey olmalı ama göremiyorum.
Çözümü burada denediniz mi? http://stackoverflow.com/a/10658604/163495 – Richard
http://stackoverflow.com/questions/17081826/net-web-api-throw-exception-return-response-return-error-response-for-404- 400-R – SimSimY
Daha fazla kod paylaşabilir miydiniz? Sorununuzu yeniden üretemiyoruz –