Send file by webservice
- by phenevo
Hi,
I have webservice, wwith method:
[WebMethod]
public byte[] GetFile(string FName)
{
System.IO.FileStream fs1 = null;
fs1 = System.IO.File.Open(FName, FileMode.Open, FileAccess.Read);
byte[] b1 = new byte[fs1.Length];
fs1.Read(b1, 0, (int)fs1.Length);
fs1.Close();
return b1;
}
and it works with small file like 1mb, but when it comes to photoshop's file (about 1,5gb) I get:
System.OutOfMemoryException
The idea is I have winforms application which get this file and saving it on local disc.