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

Brent Keller picture Brent Keller · Jun 30, 2011 · Viewed 89.9k times · Source

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.

Answer

RichC picture RichC · Mar 14, 2012

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.