Is it possible to send a file from one web page to another in asp.net

I have two realms like domain1 and domain2.

I am uploading a file to server domain1 using a method server.SaveAs

that uploads the file to domain 1

I want to upload the same file to domain2 as well as domain 1. can you suggest me how can i do this.

how can i pass docx file to querystring?

please don't ask me to use ftp.

+2


source to share


2 answers


The issue was resolved when we created an asp.net website and deployed it to the 2nd domain.



+1


source


You can upload a file to another domain from the server side using WebClient.UploadFile When the file is uploaded to the domain of the current page and saved. You can upload it to a different domain using the url.



string fileName = "PhysicalPath";
WebClient myWebClient = new WebClient();
byte[] responseArray = myWebClient.UploadFile(uriString,fileName);

      

+2


source







All Articles