Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi I am looking for the asp.net code for

Uploading the files Directly from the web to my server.

like this sample :

Upload Directly from :
http://www.sample.com/sample.exe

to :
http://www.mydomain.com/

I should mention that I do not want to first Download the files to my local computer and then upload it to my host.
all of related software just have the abilty for upload files from local computer not the we address.
Posted

What have you tried so far?

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help after this.
 
Share this answer
 
Go to the following link
http://support.microsoft.com/kb/307023[^]

Implement the same thing in your web applications code behind to make a web request to the http://www.sample.com/sample.exe

Now get the Stream and write it to your server file system from the code behind of the application(The server on which http://www.mydomain.com/ is hosted
 
Share this answer
 
You can't upload a file you don't have the bits to.

You can do one of the following:
1) Create some kind of service on your server that accepts an URL and automatically downloads the file, or
2) Write an app that pulls the bits down, and as it does, it pushes them to the server without saving a local copy.

Cheers.
 
Share this answer
 
Comments
farshadrahaei 11-Aug-10 2:16am    
thank you for your reply, you are right I am looking for a asp.net code that can do like your point 2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900