The following bit of code catches the EOS Exception
using (var reader = new BinaryReader(httpRequestBodyStream)) { try { while (true) { bodyByteList.Add(reader.ReadByte()); } } catch (EndOfStreamException) { } }
So why do I still receive first-chance exceptions in my console?
A first chance exception of type ‘System.IO.EndOfStreamException’ occurred in mscorlib.dll
Is there a way to hide these first chance exception messages?
The point of ‘first-chance’ exceptions is that you’re seeing them pre-handler so that you can stop on them during debugging at the point of throwing. A ‘second-chance’ exception is one that has no appropriate handler. Sometimes you want to catch ‘first-chance’ exceptions because it’s important to see what’s happening when it’s being thrown, even if someone is catching it.
There’s nothing to be concerned with. This is normal behavior.