Is there a way to know that a call to TextReader.Read or TextReader.ReadToEnd call will hang without throwing exeption before I do the call?
try
{
using (var filterReader = new EPocalipse.IFilter.FilterReader(tempFileName))
{
mediaContent = filterReader.ReadToEnd();
}
}
catch (Exception e)
{
Log.Error("DealerPortalIndex Error on file: " + tempFileName, e, this);
mediaContent = string.Empty;
}
filterReader.ReadToEnd() hangs and never throws exception on a certain .xls file (maybe more file)
I have also tried using a filterReader.Read(char{}, int, int) to read block and get the same problem.