1
Reply

How to set the Error Result in Web API?

Suresh Kumar

Suresh Kumar

8y
222
0
Reply
    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;