“The remote host closed the connection” in Response.OutputStream.Write

前端 未结 4 1524
清酒与你
清酒与你 2020-12-28 15:31

This code streams large files to our users:

                // Open the file.
            iStream = new System.IO.FileStream(filepath, System.IO.FileMode.Ope         


        
4条回答
  •  有刺的猬
    2020-12-28 15:43

    I am posting this answer because it might be help others and save some important time.

    In my case Response.Buffer = true in download method (on very first statement) solved the issue.

    Thanks

提交回复
热议问题