Home > http error > asp net http error 400

Asp Net Http Error 400

Contents

here for a quick overview of the site Help Center Detailed answers to

Http Error 400 Fix

any questions you might have Meta Discuss the workings and http error 400 google chrome policies of this site About Us Learn more about Stack Overflow the company Business Learn more http error 400 bad request about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community

Vmware View Client Mac Http Error 400

Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ASP.NET Web Api HttpResponseException 400 (Bad Request) Hijacked by IIS up vote 11 down vote favorite 4 I'm writing a Web API service and trying to return a

Http Error 400 Fortigate

(400) Bad Request if my ModelState is invalid. I do not want a response body to be attached to this. It appears that IIS is hijacking my response and always returning a text/html content type with a lengthy, styled error page. This is a problem. [HttpPost] public void Link(LinkDeviceModel model) { if (ModelState.IsValid) { try { model.Save(); } catch (Exception ex) { ErrorSignal.FromCurrentContext().Raise(ex); throw new HttpResponseException(ex.Message, HttpStatusCode.InternalServerError); } } else { throw new HttpResponseException(HttpStatusCode.BadRequest); } } Here is my fiddler request: POST http://localhost/myapp/service/link HTTP/1.1 Host: localhost Content-Length: 112 Content-Type: application/json Accept: application/json {"DeviceUniqueId":"CC9C6FC0-7D06-11E1-8B0E-31564824019B", "UserName": "me@mycompany.com"," Pin": "111111"} And my response erroneous, full of body, response: IIS 7.5 Detailed Error - 400.0 - Bad Request