Error: Unable to determine the principal end of an association between the types

You may get this error if you have entities related to itself. For example, you have a tree hierarchy.

Add or update URL query parameter in JavaScript

Add or update URL query parameter with respect to number of parameters and its position.

JavaScript string format

JavaScript has no built-in function to formatting strings, like C#  string.Format(). This function solves the issue adding missing functionality.

Drop All Objects in a SQL Server Database

Originally posted here: Paige C#: Drop All Objects in a SQL Server Database: Here is a script that I created that will drop all the objects in a SQL Server database. It was created using a lot of other scripts out on …

QR code authentication, or type less, be more secure

The idea of using a private phone to secure web sites take off with the solution of BenjaminSoulier.

Why Apache does not start on Windows 7?

Recently I started developing website on WordPress. In order to set up a local web server with Apache/PHP I have downloaded XAMPP. At the same time I’ve experimented with .NET features which, probably, caused the issue – I could not launch Apache. It failed due to the port 80 was busy.

Post JSON objects with nested classes to MVC action

Default view model binding of ASP.NET MVC has a disadvantage when using view models with nested classes and JSON objects. The binding is unable to recognize such nested classes and it initializes them to NULL value. This text describes a cause and solutions.

Controlling application version number with NAnt and TeamCity

I’m pretty sure almost every developer has ever struggled on how to change version number in the different way than TeamCity provides that by default. In my case I wanted to get date-based version number to clearly represent a sprint in which the build was created.

Speeding up calculation of an average in continuous processes

Processing big sets of data can cause a low performance due to inefficient calculations. In order to overcome this issue we should rewrite calculations in a way which allows getting results using the latest data about sequence. This text describes an algorithm of  sequential average.

How to specify Expires header for static resources in ASP.NET MVC?

Thanks to author of the post on He posted a link to the broadest description of the ways the header “Expires” can be specified for static resources. Here it is – clientCache. Finally, I put the following setting in my web.config: <system.webServer> <staticContent> <!–Never Expires–> <clientCache cacheControlMode=”UseExpires” httpExpires=”Sun, 07 Apr 2047 00:00:00 GMT” /> […]