Download file from server to client machine (Urgent)
Hi frnds
In app i want to give a link when it clicked all the files from the specific folder must be copied to client machine.
what i was trying is using
File.Copy(Source,Destination,true)
this statement is working fine if i m using the server as the client but if i installed this app on the server and access this app from the client machine it does not copy any file.
pls tell me the safest way to copy a file from server to client machine.
Re: Download file from server to client machine (Urgent)
Quote:
Originally Posted by FundooGuy
but if i installed this app on the server and access this app from the client machine it does not copy any file.
What do you mean by does not copy ?
Do you get an exception ? What is the error message ?
Did you check permissions ? does the Client have permissions to read from the server ?
Do you copy from LAN or downloading from web (HTTP) ?
Re: Download file from server to client machine (Urgent)
It does not show any exception.
i m trying to copy on web.
Re: Download file from server to client machine (Urgent)
Ok
This is a very simple download code :
Code:
System.Net.WebClient client=new System.Net.WebClient();
client.DownloadFile(txtURL.Text,txtFile.Text);
Re: Download file from server to client machine (Urgent)
Try to add your server (http://myserver) in the client side into the setting of Internet Explorer -> security -> trusted sites