How to set the Error Result in Web API?
Suresh Kumar
Below is the sample code to show how to set error result in Web API –HttpResponseMessage myresponse = new HttpResponseMessage(HttpStatusCode.Unauthorized); myresponse.RequestMessage = Request; myresponse.ReasonPhrase = ReasonPhrase;