WebAPIContrib.Core
WebAPIContrib.Core copied to clipboard
System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.
The EndOfStream
call in the CSV input formatter is synchronous and causes the model binder to throw an exception due to this breaking change.
System.InvalidOperationException: Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.
That loop condition can be changed to something like this:
string line;
while ((line = await reader.ReadLineAsync()) != null)