1
Reply

How to set the Error Result in Web API?

Suresh Kumar

Suresh Kumar

7y
158
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;