Hello everyone, I am using the below code using retry pattern to copy files over the network.
private int ReadSourceStream(FileStream _sourceStream, Byte[] _buffer)
{
return _sourceStream.Read(_buffer, 0, BUFFER_SIZE);
}
In case the network is disconnected and exception
is thrown, the (method) is recalled with the same parameters untill the network is resumed. The issue is that even after the network is resumed
I still get the following exception "The specified network name is no longer available". I added File.Exist check before ReadSourceStream method
and it returns true after network is resumed but while reading it throws the exception.