Download file problem

G

Guest

Hi,
I have a problem with System.Net.WebClient.DownloadFile() method used in an
aspx page.

The error is: The underlying connection was closed: Unable to connect to the
remote server.

If I run the application locally on the server the code works, but if I run
it from any other computer from the network it doesn't work.

The code I'm using is:
System.Net.WebClient wc = new System.Net.WebClient();
try
{
wc.DownloadFile(downloadPath,pathForDownload);
this.CloseWindow("The template was downloaded");
}
catch(Exception ex)
{

throw ex;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,060
Latest member
BuyKetozenseACV

Latest Threads

Top