Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome returns "Bad Request - Request Too Long" when navigating to local IIS Express

I have a web application that runs perfectly fine when I use the Visual Studio 2010 development server (Cassini). However when I try to use IIS Express to host the site Chrome just displays a "Bad Request - Request Too Long" error. The IIS Express site does display in other browsers (FireFox and IE9) so I'm kind of confused. The error occurs in Chrome when I try request pages in my application or even basic resources like an image, so I don't think it is an issue with URL rewriting or routing.

Just to see if the problem was somehow a result of my site's code, I created a new MVC3 website and tried running that. This worked in the VS development server, but once again produced the "Bad Request" error when running under IIS Express.

I am about to start testing the site using some mobile devices so I need to get this running under IIS. Any suggestions would be greatly appreciated.

EDIT:
The root url of the site (http://localhost:50650/) is being requested using GET. I am currently using Chrome v12.0.742.112.

like image 424
Brent Keller Avatar asked Jun 30 '11 17:06

Brent Keller


People also ask

How do I fix bad request request too long?

The “Bad Request – Request Too Long” error is exclusive to browsers. The typical solution is to clear the cache and cookies in your browser.

How do you fix the header request too long on Google Chrome?

The “Bad Request – Request Too Long” error is exclusive to Chrome. Typically the solution is to clear the cache and cookies in your Chrome browser, making sure to completely close all browser windows and tabs after doing so.

How do I fix HTTP error 400 a request header field is too long?

Chosen solutionClear the Cache and remove the Cookies for websites that cause problems via the "3-bar" Firefox menu button (Options/Preferences). If clearing cookies didn't help then it is possible that the cookies. sqlite file in the Firefox profile folder that stores the cookies got corrupted. rename/remove cookies.

What does this mean bad request request too long?

Bad Request - Request Too Long - HTTP Error 400. The size of the request headers is too long. This usually means that you have one or more cookies that have grown too big.


1 Answers

I get this all the time ONLY in Chrome and I have to clear browsing data to fix it.

Wrench > Tools > Clear Browsing Data

Check the following:

  • Clear browsing history
  • Clear download history
  • Empty the cache
  • Delete cookies and other site data

Then click "Clear Browsing Data" button and refresh your page.

UPDATE:
I figured out that it has to do with writing too many cookies to the browser and that if you just close all instances of Chrome, the error goes away for a while. To prevent it, you'll need to clear out your cookies programmatically.

like image 97
RichC Avatar answered Oct 04 '22 15:10

RichC