File.ReadAllBytes() return {byte[0]}
I want to uplad file to specific location using asp.net webservice .When I writing this:byte[] file = FileUpload1.FileBytes;
and passing webservice,webservice works fine.Client can be windows service may not web application.File path can be sent to service.From file path,I want to convert to byte array.So I used
byte[] array = File.ReadAllBytes("C:\\Users\\riya\\Desktop\\sample.txt");
But it is not working.Array always contain zero{byte[0]}.How to handle this?