Click here to Skip to main content
14,733,810 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I am calling a webservice which is sending me the bytearray of the file which i am sending as the parameter in the webmethod.

I want to convert this byte array into the file with same extension and type which i am sending in the webmethod like:-


Now here the byte array returned from the web service should get converted into docs file only with the same name (Testing) into my local computer.

I am not able to write the code of converting it into the File and saving it on my local computer


Varun Sareen
Updated 23-Aug-17 11:04am
Nilesh Patil Kolhapur 26-Apr-12 5:04am
Sorry sir, i think u have better knowledge than me but try this
File.WriteAllBytes(string path, byte[] bytes)
Hope its Help u.
Kschuler 27-Apr-12 15:35pm
You should post this as a solution, not just a comment.
Maciej Los 29-Apr-12 9:04am
I agree with you.
Varun Sareen 27-Apr-12 1:25am
Maciej Los 29-Apr-12 9:07am
Please, mark your question as "solved", if the answer of Nilesh solves your problem. It would be good to see the solution.
Nilesh Patil Kolhapur 30-Apr-12 0:15am
ok i post this as solution

1 solution

File.WriteAllBytes(string path, byte[] bytes)

Hope its Help u.

Best luck
Jaspreet Singh Bhasin 18-Dec-12 0:38am
Can we perform the same operation using javascript??

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