Download file from http/https
Hello Everybody,
On my page load, I need to download a file say http://example.com/file.csv or https://example.com/file.csv to some location on my web server without prompting save as dialog box. Means it will be a download in background from some server to my server. Any ideas on how to do this?
Thanks.
Re: Download file from http/https
I think you can simply copy the file as you do with vb.net with System.Io . I am pretty sure that the file can be copied outside of your web site limits but you must use your full server path and NOT the relative path. For example "c:\myotherwebsites\afolder"
Re: Download file from http/https
The ftpwebrequest methods will do it if you have the ftp credentials to access the remote server.
http://msdn.microsoft.com/en-us/library/ms229711.aspx