Asp.net Http Error 400 - Bad Request
here for a quick overview of http error 400 bad request request too long the site Help Center Detailed answers to any
Http Error 400 Bad Request Python
questions you might have Meta Discuss the workings and policies of this site About
Urllib2 Httperror Http Error 400 Bad Request
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow
Http Error Code 400 Bad Request
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community 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 HTTP 400 http 400 bad request error internet explorer Bad Request up vote 2 down vote favorite Always get 400 Bad Request on a valid request. Maybe some hints ? Need to fix this very badly. Controller public class MyController : ApiController { public IEnumerable GetAll(string language) { return new [] {"a", "b", "c"}; } } Request $.ajax({ type: "POST", url: "http://localhost:5378/Api/MyController/GetAll", dataType: "json", contentType: "application/json; charset=utf-8", data: { "language": language }, cache: false, complete: function (xhr) { console.output(xhr.status.toString()); } }); WebApiConfig public static void Register(HttpConfiguration config) { config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); var appXmlType = config.Formatters.XmlFormatter.SupportedMediaTypes.FirstOrDefault(t => t.MediaType == "application/xml"); config.Formatters.XmlFormatter.SupportedMediaTypes.Remove(appXmlType); } Webconfig http://stackoverflow.com/questions/17204622/asp-net-web-api-http-400-bad-request Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft https://support.microsoft.com/en-us/kb/826437 Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Getting Started/HTTP Error 400: Bad Request HTTP Error 400: Bad Request [Answered]RSS 2 http://forums.asp.net/t/1731158.aspx?HTTP+Error+400+Bad+Request replies Last post Oct 18, 2011 04:53 AM by salman behera ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply MoneyRan Member 55 Points 224 Posts HTTP Error 400: Bad Request Oct 17, 2011 12:45 PM|MoneyRan|LINK I have the following line in my bad request page mark up: This gives me the Bad Request error and I don't know why. The folder name and path are all correct. Also, in my login page, I am calling a Response.Redirect on successful login like this: Response.Redirect("~\Home.aspx"). "Home" page and "Account" folderare right under the project 400 bad request and "MyAccount" page isinside the Account folder. Is this the right syntax? I triedreplacing "~" with ".." but even that did not work. I also tried to use forward slash instead of backward slash (!!!), but everything returns the same error. Help!! Just Be Reply abiruban Star 11270 Points 2687 Posts Re: HTTP Error 400: Bad Request Oct 18, 2011 04:33 AM|abiruban|LINK hi http://www.hanselman.com/blog/ExperimentsInWackinessAllowingPercentsAnglebracketsAndOtherNaughtyThingsInTheASPNETIISRequestURL.aspx http://forums.asp.net/t/1549184.aspx/1 http://weblogs.asp.net/imranbaloch/archive/2010/04/23/understanding-400-bad-request-exception.aspx Reply salman beher... All-Star 21483 Points 5962 Posts Re: HTTP Error 400: Bad Request Oct 18, 2011 04:53 AM|salman behera|LINK Hi, there are many reason for that error... but in your requirement refer below link.... http://support.microsoft.com/kb/932552 in it found in IIS,then.... http://stackoverflow.com/questions/948428/asp-net-http-400-bad-request-error-when-trying-to-process-http-localhost5957 Thanks... "…Mark As Answer" if my reply helpful to you…” Sincerely, Salman ‹ Previous Thread|Next Thread › This site is managed for Microsoft by Neudesic, LLC. | © 2016 Microsoft. All rights reserved. Privacy Statement| Terms of Use| Contact Us| Advertise With Us| CMS by Umbraco| Hosted on Microsoft Azure Feedback on ASP.NET| File Bugs| Support Lifecycle