
>我正在尝试通过ASP.NET页面中的HTTP(而不是SSL)从服务器下载许多文件,但是其中一个文件没有下载;它返回一个错误:操作超时.
>当我尝试通过HTTPS下载此文件时,它运行良好.
>我尝试使用其他软件通过纯HTTP下载文件,但收到了相同的错误消息.
我非常感谢任何指导或帮助.
if (The file is executable file )
May be because the web
server for some EXE files resides on
doesn’t send a
Content-Length header. If this header
is absent, the only way you can
determine if the download is complete
is “when the bytes stop coming”, i.e.
the TCP/IP connection is closed or
times out. If the connection quality
is low, this may very well happen
prematurely.But why this not happened in Https?
Thats because http has bigger waiting
time and smaller receiving time. https
on the other hand has smaller waiting
time and bigger receiving time.The http port on the shared hosting
server is more busy, thus a request
stays longer in the queue until is
accepted by the server.On the https port there is less
traffic on the server so the request
is serviced faster.
转载注明原文:C#-通过HTTP下载文件不起作用,但通过https工作正常 - 乐贴网