为什么html文件放在云盘 打开 failed to load resource.cfg放在哪 net:err

37682人阅读
软件(46)
在IE/FF下没有该错误提示,但在Chrome下命令行出现如下错误信息:Failed to load resource: net::ERR_CACHE_MISS该问题是Chrome浏览器开发工具的一个bug,看起来和缓存有关,已提交到Chrome问题系统中(/p/chromium/issues/detail?id=424599)。不影响正常使用,可忽略,将在Chrome40.x.x.x版本中修复。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:2644008次
积分:28882
积分:28882
排名:第122名
原创:454篇
转载:56篇
译文:83篇
评论:437条
(3)(5)(6)(10)(4)(6)(2)(2)(1)(2)(3)(2)(3)(1)(2)(3)(6)(7)(13)(20)(23)(17)(21)(18)(5)(18)(17)(9)(8)(2)(2)(10)(8)(9)(7)(7)(17)(6)(18)(6)(10)(12)(1)(15)(2)(7)(4)(9)(7)(4)(3)(5)(12)(3)(18)(11)(6)(3)(8)(7)(5)(1)(5)(5)(2)(3)(1)(1)(3)(5)(3)(1)(10)(1)(1)(5)(11)(12)(22)(5)(12)(1)(1)(1)c# - IIS & Chrome: failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING - Stack Overflow
to customize your list.
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
Join the Stack Overflow community to:
Ask programming questions
Answer and help your peers
Get recognized for your expertise
I recently came across a Chrome issue which I think is worth sharing it with you.
I worked on a self written API using an HttpHandler which primary should return json data. But when an error occures I wanted to display an html file. That worked pretty well in IE and FF, but not in Chrome.
Looking to the developer tools revealed this error: net::ERR_INCOMPLETE_CHUNKED_ENCODING
Google said not very much about this issue while it was seen very much. All I got to know was, that it was magically disappearing after some time.
I found out it lays on this lines of code:
result.StoreResult(context);
context.Response.Flush();
context.Response.Close(); //&-- this causes the error
After removing the last line it worked well. I don?t know why only Chrome had/has an issue with that, but it seemed as if I closed the response stream before chrome finished reading it.
I hope it helps those of you coming across the same or a similar issue.
Now my question:
How is the best pratice in closing/flushing the response stream? Are there any rules?
According to :
ASP.NET transfers the data to the client in chunked encoding (Transfer-Encoding: chunked), if you prematurely flush the Response stream for the Http request and the Content-Length header for the Response is not explicitly set by you.
Solution: You need to explicitly set the Content-Length header for the Response to prevent ASP.NET from chunking the response on flushing.
Here's the C# code that I used for preventing ASP.NET from chunking the response by setting the required header:
protected void writeJsonData (string s) {
HttpContext context=this.C
HttpResponse response=context.R
context.Response.ContentType = &text/json&;
byte[] b = response.ContentEncoding.GetBytes(s);
response.AddHeader(&Content-Length&, b.Length.ToString());
response.BinaryWrite(b);
this.Context.Response.Flush();
this.Context.Response.Close();
catch (Exception) { }
33.3k15144248
I was running into this error when generating a file and pushing it to the user for download, but only occasionally. When it didn't fail, the file was consistently 2 bytes short. Close() forcibly closes the connection, whether it's finished or not, and in my case it was not. Leaving it out, as suggested in the question, meant the resulting file contained both the generated content as well as the HTML for the entire page.
The solution here was replacing
context.Response.Flush();
context.Response.Close();
context.Response.End();
which does the same, but without cutting the transaction short.
I was also getting same error. This issue was with web server user permission on cache folder.
In my case, the problem was cache-related and was happening when doing a CORS request.
Forcing the response header Cache-Control to no-cache resolved my issue:
[ using Symfony
component ]
$response-&headers-&add(array(
'Cache-Control' =& 'no-cache'
1,71111726
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enablednode.js - Live reload fails - Failed to load resource: net::ERR_CONNECTION_REFUSED - Stack Overflow
to customize your list.
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
Join the Stack Overflow community to:
Ask programming questions
Answer and help your peers
Get recognized for your expertise
I am starting live reload via Gulp:
var $$ = require('gulp-load-plugins')();
gulp.watch('*', function (file) {
$$.livereload().changed(file.path);
gulp.task('connect', function(){
var connect = require('connect');
return connect()
.use(require('connect-livereload')())
.use(connect.static(__dirname))
.listen(8000);
It had been working until I recently got this cryptic error in the browser console and reload stopped working:
Failed to load resource: net::ERR_CONNECTION_REFUSED
http://localhost:35729/livereload.js?snipver=1
Any idea what happens here?
I am behind proxy but localhost is excluded.
11.6k83348
3,85132349
Know someone who can answer?
Share a link to this
via , , , or .
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Browse other questions tagged
Stack Overflow works best with JavaScript enabled怎么解决Chrome浏览器“Failed to load resource:net:ERR_百度知道
怎么解决Chrome浏览器“Failed to load resource:net:ERR
可以尝试更改一下网络代理,然后刷新一下Chrome浏览器这是网址中部分资源加载失败导致,检查一下网络是否异常
知道智能回答机器人
我是知道站内的人工智能,可高效智能地为您解答问题。很高兴为您服务。
其他类似问题
为您推荐:
chrome浏览器的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}

我要回帖

更多关于 loadfromresource 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信