Firefox Error Message "filename part could not be saved, because the source file could not be read"
This error is discussed in many places on the internet. It's a strange problem as some Firefox installs will work and others won't even if they are the same version. Some Chrome installs don't work either but IE always seems to work.
There are a number of discussed solutions; mostly based around cleaning out "corrupt" files from Firefox but they do not often work as discussed by the people in the forums.
However, I have found that in a number of places the problem is nothing to do with the browser but is caused by the server and (in my case) the ASP.NET code for the download.
开发者_运维问答Simply put, once a file is larger than a certain size (In the case of my servers at DiscountASP the limit is 4Mb) then you get the error unless you specify that the download is comprised of parts.
Adding this to the response object cures the problem:
C#
context.Response.StatusCode = 206;
context.Response.StatusDescription = "PartialContent";
Even if the file is smaller that the size limit, adding the above code does not seem to cause any problems.
I hope this is useful to people trying to cure this annoying problem.
精彩评论