I at random times get the error: An unhandled exception of type 'System.ExecutionEngineException' occurred in mscorlib.dll. I am trying to decrypt an csv or txt file when this happens. These files could have 20,000 rows in them. Any idea what could cause this? It fails on this code line:
//Print the contents of the decrypted file.
StreamWriter fsDecrypted = new StreamWriter(sOutputFilename);
--> Error fsDecrypted.Write(new StreamReader(cryptostreamDecr).ReadToEnd());
fsDecrypted.Flush();
fsDecrypted.Close();