Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi friends

I want to capture uploaded file from remote machine and pass it to web service,but was not able to find any feasible solution,want a code in c# and asp.net
please help
Posted

Hi,

you can make an object of stream and pass through the webservice but make sure it must be serializable.
 
Share this answer
 
You want to do something like this and likely convert the file to an array of bytes.


 using (BinaryReader b = new BinaryReader(File.Open("TextFile1.txt", FileMode.Open)))
 {

        byte[] bytes =  new byte[b.BaseStream.Length];
        b.Read(bytes, 0,bytes.Length);




}
 
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