Question

I have created my custom CSV media type formatter following these two tutorials:

http://www.asp.net/web-api/overview/formats-and-model-binding/media-formatters

http://www.tugberkugurlu.com/archive/creating-custom-csvmediatypeformatter-in-asp-net-web-api-for-comma-separated-values-csv-format

And it work fine, if not one problem:

I am not getting the hole data on csv file.

enter image description here

and on my csv i am getting 172 lines:

enter image description here

What could be causing this problem?

No correct solution

OTHER TIPS

For everyone who find the "data loss" problem when using StreamWriter: This is the fix i have found:

 myStreamWriter.AutoFlush = true;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top