Suresh Kumar
How to set the Error Result in Web API?
By Suresh Kumar in ASP.NET on Nov 22 2017
  • Suresh Kumar
    Nov, 2017 22

    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;

    • 0