Click to See Complete Forum and Search --> : Download file from server to client machine (Urgent)


FundooGuy
June 21st, 2005, 06:38 AM
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.

hspc
June 21st, 2005, 04:15 PM
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) ?

FundooGuy
June 22nd, 2005, 12:35 AM
It does not show any exception.
i m trying to copy on web.

hspc
June 23rd, 2005, 06:07 PM
Ok
This is a very simple download code :
System.Net.WebClient client=new System.Net.WebClient();
client.DownloadFile(txtURL.Text,txtFile.Text);

VERESK
June 24th, 2005, 04:05 AM
Try to add your server (http://myserver) in the client side into the setting of Internet Explorer -> security -> trusted sites