I have the following code to send a stream (file) to a wcf client:
public Stream Download( string path )
{
try
{
FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read);
return stream;
}
catch (Exception ex)
{
string error = ex.Message;
return null;
}
}
I want to be able to get the length of the sent stream on the client side, but the Stream class does not support this.
What would be the best way to do this?
Thank you, Tony
source
share