.NET - 2015

Debugging Windows Service application with console in C#

An easier way to debug and develop Windows Services
 
0
Developing Windows Service might a a real headache since you do not have any visual part to see the output. Even if you want to rely on Visual Studio debugger you need to install the service, stop it (if already running), deploy, start the service from Windows MMC and finally hook up Visual Studio to the running service process...read more

Non blocking writing to console in C#

Write message to console without blocking current thread
0
The fast and most commonly used method to debug code is for sure using console applications. Since main operations are reading input and writing output, it does not take much to set it up and start debugging your code. One more reason for using console application is to test the performance...read more

IP address filtering from C# code in ASP.NET MVC and Web Api

Restrict or allow specific IP addresses to access your WebApi or MVC
 
 
0
Last year I wrote an article about IP address filtering on MVC and WebApi Restrict Access to an MVC Action or Controller based on IP address. Over time the requirements for IP filtering in several web based application increased, so I had t work on this class to make it more extendible and reusable in different scenarios...read more

.NET managed scheduled task runner

Scheduled managed code execution in .NET
 
0
Sometime ago I wrote an article about Windows Scheduled Task vs Windows Service where I compared and listed benefits and drawbacks of using scheduled tasks in Windows and Windows Services for executing certain operation which repeats in some time span. However idea of executing tasks in a single Windows Service is very useful if you need to execute task in a short time span plus you have a full control including logging and other fine grained customization in case you write the task in your code...read more

MSMQ JSON message formatter

Use JSON to serialize and deserialize message queue messages
0
Storing objects in the message queue (MSMQ) is based on the serialization of the object instance using some of the serializes, basically any class the implements IMessageFormatter. Most commonly used ones are BinaryMessageFormatter and XmlMessageFormatter. I prefer XmlMessageFormatter over BinaryMessageFormatter, mostly because messages are stored in a readable format inside the queue, so in case something goes wrong you can direly check the content of the message using built Computer Management MMC (Microsoft management console) in the. ...read more

Multiple console output in C#

Write console output to file and screen at the same time
 
0
Console applications are the simplest one and very convenient when you need to quickly test some functionality. Some time the functionality that you test with console application may take time and since it is test usually it happens that it crashes...read more

Auto reload application config in .NET

Reflect config file changes in application in a runtime
 
0
In .NET working with configuration is really easy and there are bunch of .NET classes that rely on config values so you do not have to specify values in their constructors. For me it a common practice to instantiate database connections of WCF client by only creating an instance with parameterless constructor while keeping values in config file...read more

JavaScript

read more

SQL/T-SQL

read more

Umbraco CMS

read more

PowerShell

read more