I am using below
var inputPath = "file:" + fileName.Replace(@"\", @"/");
var uri = new Uri(inputPath);
var client = new WebClient();
client.DownloadFile(uri, downloadPath);
The "file://*" with filename opens in browser directly.
The file is housed on the server and able to be accessed and download when run from DEBUG in VS2012 using my localhost but when I type in the browser to connect to the DEV server version it will not download the file.
The app pool is running under my name because I cannot get the app pool to work under AppPoolIdentity. I have Full Control of folder path for the file location. So does ANONYMOUS and Everyone just in case all of this was a security issue.
Since its a DEV box I have even removed the Firewall completely to see if the Firewall was blocking the download.
When I run from the Chrome browser and F12 I can see that the section of code has a Status Code of 200 'OK' when the DownloadFile runs, so there is no error it just doesn't save to my downloadPath location.
Please advise if you have seen this before.