Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In Asp.Net, can I upload a single file to multiple websites using C#?
Posted
Updated 26-Nov-10 22:25pm
v2

1 solution

I dont understand wtf you are asking.

There's several options.

- FTP upload
- Web Service Upload
- Share on intranet ?
- Binary Stream Upload ( Most probably)

If you knwo the specific url execution per website to uplaod the content of the file then you can write a automated app todo the task from a folder set to receive incoming files for upload.

Read the file contents into a binarystream - execute the remote url into a passive web page content iside your c# app (not need to build asp page) execute the event on that virtual page by means of invoke then submit it. Depending on that page - you should get some hwo a confirmation - you can then build your business logic to inform your app that the file was uploaded out fo the possible given web sites.

Of course, you can have hot config to specify what pages to upload based on the file details / specifications.
meaning .jpg goes to 3 pages, .gi goes to 5 pages, etc.

If you have a uplaod process on your ASP page that you need to distribute to multiple web sites - your best bet is to use ftp in passive mode to transfer the binary - then email the client / user of your asp page on the result after your processes are complete.

Regards,
X
 
Share this answer
 

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