0

I'm currently using WebClient to download files from passing specific urls, though the downloading is working perfectly on localhost but once it's published on the production server it always gives "404".

    using (var client = new WebClient())
    {
    var data = client.DownloadData(filePath);
    var content = new System.IO.MemoryStream(data);
    var contentType = "APPLICATION/octet-stream";
    return File(content, contentType, file);
    } 

0 Answers0