Chrome返回“错误请求-请求太长"导航到本地IIS Express时 [英] Chrome returns "Bad Request - Request Too Long" when navigating to local IIS Express
问题描述
当我使用Visual Studio 2010开发服务器(Cassini)时,我有一个运行良好的Web应用程序.但是,当我尝试使用IIS Express托管网站时,Chrome只会显示错误请求-请求太长"错误. IIS Express站点确实显示在其他浏览器(FireFox和IE9)中,所以我有点困惑.当我尝试在应用程序中请求页面甚至是图像等基本资源时,Chrome中就会发生错误,因此我认为这与URL重写或路由无关.
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.
只是为了查看问题是否是网站代码的结果,我创建了一个新的MVC3网站并尝试运行该网站.这在VS开发服务器中有效,但是在IIS Express下运行时再次产生错误请求"错误.
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.
我将开始使用某些移动设备来测试站点,因此需要使它在IIS下运行.任何建议将不胜感激.
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.
使用GET请求网站的根URL(http://localhost:50650/).我目前正在使用Chrome v12.0.742.112.
The root url of the site (http://localhost:50650/) is being requested using GET. I am currently using Chrome v12.0.742.112.
推荐答案
我只能在Chrome中始终获得此提示,并且我必须清除浏览数据才能对其进行修复.
I get this all the time ONLY in Chrome and I have to clear browsing data to fix it.
扳手>工具>清除浏览数据
Wrench > Tools > Clear Browsing Data
检查以下内容:
- 清除浏览历史记录
- 清除下载历史记录
- 清空缓存
- 删除cookie和其他网站数据
然后单击清除浏览数据"按钮并刷新页面.
Then click "Clear Browsing Data" button and refresh your page.
更新:
我发现这与向浏览器写入太多Cookie有关,如果您仅关闭所有Chrome实例,该错误就会消失一会儿.为防止这种情况,您需要以编程方式清除cookie.
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.
这篇关于Chrome返回“错误请求-请求太长"导航到本地IIS Express时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!