Reputation: 601
WebClient fileReader = new WebClient();
fileAddress = listItem;
//error here uri formats are not supported
fileReader.DownloadFile(fileAddress, saveTo);
here in fileaddress address coming
http://pcdev04.pcsolution.net:83\Update32\rts\RTSUpdate.dll
Upvotes: 1
Views: 5971
Reputation: 1039110
You need to replace \
with /
in your URI string in order to have a valid address:
fileReader.DownloadFile(fileAddress.Replace("\\", "/"), saveTo);
Upvotes: 5