MVC下载远程文件流(WebClient)

public ActionResult DownLoad_File()
        {
            
            return File(ScLiu(PathUrl), "application/octet-stream", "sb.pdf");
            
        } 

public Stream ScLiu(string path)
        {
            using (System.IO.MemoryStream memStream = new System.IO.MemoryStream())
            {
                WebClient webClient = new WebClient();
                var obj = webClient.OpenRead(path);
                return obj;
            }
        }
原文地址:https://www.cnblogs.com/gaocong/p/4930134.html