-
WebClint download file not working on server
Hi,
To download file, the following code works on localhost but not working on Web server. Can you help please?
Thanks
austin2.
WebClient wc = new WebClient();
wc.DownloadFile(@"http://www.WebUrl.com/Documents/Test.pdf", @"C:/test/Test.pdf");
-
ftp client
hi there,
can you copy and paste the generated error?
it turns out that on your client computer, ftp client settings work fine.
however, in a server there are security settings for ftp access, which are stricter than the ones you have in your client computer.
that means your code might need to be modified to comply with the security settings of your server.
however, there is something you can do:
in your server, open internet explorer (indeed you can try all browsers in your server) and use this web address --> http://www.WebUrl.com/Documents/Test.pdf
watch the results, which can give you an idea of what is be happening.
moreover, you can use ftp client software, like filezilla, cute ftp, core ftp, and so forth, and then watch what happens between the same program between your computer and this server.
besides, http://www.WebUrl.com/Documents/Test.pdf is downloading via http://
probably, you can try by downloading through ftp:// if there is such ftp server that you can use to download this file.
you could also get the stack trace of this error, by using StackTrace property of your exception instance in your catch block.
i hope this helps,
tonci korsano.
-
WebClint download file not working on server
Thanks, Tonci
Our Web site is an IIS. The page can download file from my localhost machine. But the same page not working on Web server. There is no error message.
the Test.pdf file can display as well on the browser. Is there any browser security setting or network security setting I can try?
Thanks
austin2
-
maybe looking at the event log
hi there,
if you opened a browser in your server and could download locally that file then maybe you can look for events in your event log.
i mean events about iis.
this page --> http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx talks about event ids related to iis, and the last one mentions about downloads being prevented.
you would basically look for these events in the typical sections of security, application and system.
besides looking for iis events, i would also look at dotnet generated events.
this event might be a warning instead of an error.
it shouldn't be so hard to find such an event because you know the timestamp at which you tried to download this file with your program that works from your computer.
good luck,
tonci korsano.
Similar Threads
-
By mikester20 in forum ASP.NET
Replies: 0
Last Post: 10-30-2006, 06:25 PM
-
By JavaFaces in forum Java
Replies: 0
Last Post: 02-12-2006, 07:27 PM
-
By mujtaba_ak in forum Java
Replies: 2
Last Post: 11-03-2005, 08:40 AM
-
By bubberz in forum ASP.NET
Replies: 1
Last Post: 10-02-2005, 11:59 PM
-
Replies: 7
Last Post: 09-15-2000, 08:44 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|