NancyFX + CORS

Every once in a while you need to have access to a json api from another domain. Thankfully there’s a mechanism to allow this. This Mechanism is called CORS So before any JSON request is allowed a Options requst will be sent to the corresponding ressource and expects a „Access-Control-Allow-Origin“ header to be present. There can…

C# Export Data as XLSX

As I needed to export some data to an xlsx (Excel 2007+) file.I first used the Microsoft OpenXML library called DocumentFormat.OpenXML. At first it looked good but it had some major performance issued while using the object oriented style. I switched over to the OpenXMLWriter (SAX) but this introduced another class of problems like corrupted…

C# DataTable to MySQL

I had a very basic problem while coding on a project and it was simply bulkinsert from a .NET DataTable to the MySQL Server and do this FAST! After crawling the net for a while I came to the conclusion that every one of those methods where either slow or didn’t fit my needs so…