ASPNETWebAPISamples
ASPNETWebAPISamples copied to clipboard
Cannot get the download to work in CSV formatter sample
I've downloaded the code from the repository but face the following issues after building and running using IIS Express (VS 2012): I get an exception - Method not found: 'Void System.Net.Http.Headers.HttpHeaders.AddWithoutValidation(System.String, System.Collections.Generic.IEnumerable`1<System.String>)'. Object Explorer confirms that there is no such method in System.Net.Http.Headers.HttpHeaders - what version of System.Net assembly are you using? can I download that version from somewhere?
I've followed the code from your blog and created a CsvMediaTypeFormatter in a standalone project, but I needed to add streamWriter.Flush() call to get data in the downloaded file. Removing the call to flush causes the CSV file to not have any data