Custom conversion of specific objects in JSON.NET

If anyone’s interested in my solution: When serializing certain collections, I wanted to create an associative json array instead of a standard json array, so my colleague client side developer can reach those fields efficiently, using their name (or key for that matter) instead of iterating through them. consider the following: public class ResponseContext { … Read more

EventLog write permissions

By default, any authenticated user is able to write to application event log. However only administrators can create new event Sources. If all event Sources are known at the service installation time, I recommend register those sources ahead of time, then you will be all set up. Registering is a simple call to EventLog.CreateEventSource. If … Read more

IL level code debugger

The best way to do this is to use ILDASM to disassemble the managed binary, which will generate the IL instructions. Then recompile that IL source code in debug mode using ILASM, when you fire up the Visual Studio debugger you will be able to step through the raw IL. ildasm foo.exe /OUT=foo.exe.il /SOURCE ilasm … Read more

Parse relative URI

Although you can create a Uri without a host portion, most of its properties will then throw an InvalidOperationException (“This operation is not supported for a relative URI”) because those properties rely on an absolute Uri. HttpUtility.ParseQueryString() is indeed not going to help here, because it only operates on the query part of an Uri, … Read more

Open Source .Net Reporting Tool [closed]

fyireporting (released under Apache License) is worth a try. The fyiReporting RDL Project is a powerful report and charting system based on Report Definition Language (RDL). Tabular, free form, matrix, charts are fully supported. Report output may be displayed as HTML, PDF, XML, .Net Control, Web Archive, and to a printer. Libraries exist for use … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)