locked
HOW TO WRITE OR UPLOAD FILE USING WCF SERVICE TO ANOTHER SERVER RRS feed

  • Question

  • User708137807 posted

    HI TEAM,

    I  have a Client WEB SERVICE which gives send Few files to my MY WCF SERVICE.   They are sending  the data in  the file byte array , and these   files we need to  created on the remote server location lets say ...       //121.122.122.133//ContentFolder// .  So my question is when i was using WEB Forms in that FileUpload.Saveas Works properly. BUT from WCF service how can i create  write these files in that folder.  Please provide Suggestions

    Monday, February 26, 2018 12:46 PM

All replies

  • User753101303 posted

    Hi,

    ContentFolder is a network share on the 121.122.122.133 server and you were saving at the same location with Web Forms ? It shouldn't make any difference. It really depends which kind of communication is enabled betwen those two servers.

    Assuming network sharing see for example https://stackoverflow.com/questions/16227964/save-byte-array-to-unc-path

    Monday, February 26, 2018 1:10 PM
  • User1168443798 posted

    Hi Swap_PG,

    >> from WCF service how can i create  write these files in that folder.

    Where did you host WCF Service? Is it hosted on the remote server or different server? If it is in the remote server, you could create the file directly by File class.

    If not, as the suggestion from PatriceSc, you may make the folder as shared folder first, then we could access and write the content from other servers.

    Best Regards,

    Edward

    Wednesday, February 28, 2018 2:47 AM