How To: Integration of WCF with Autofac

If you’d like to hide WCF implementation class behind an interface to simplify future changes you should deal with some IoC. I use Autofac and have several times struggled upon the same point when trying to configure WCF to work with it. This trouble begins when you end up with failed service and message “The […]

List test assemblies in TeamCity for MSTest build step

How To: Specify assemblies in TeamCity for MSTest build step

The approach to specify DLLs in MSTest build step in TeamCity  with a string pattern to be easily adopted for specific project.

Most used Git commands

The most used commands in Git console which are used by me in projects. The reference is often overwhelmed with information which hinders me to use it in practice. This text is the place to keep working examples for quick reference instead of looking them up from somewhere in the internet.

Calculation of PowerSet on C#

This text explains a binary algorithm to calculate a power set of any sequence. It has a sample code in C#.

Online editors for developers

The list below has links to online IDE for different languages. All you need is just put your code here and run. Please, add your suggestions to add new resources in comments? Free online IDEs Coding Ground – Edit, compile, execute and share your projects, 100% cloud. The all-out list of supported languages. (Quick links to editors: C#, […]

Programming Tests

  • March 15, 2015
  • Tools

The list below has all web sites which I found with free test plans for programming tests. Please, suggest your web site in comments if you cannot find someone. Free tests for developers TestDome – a bunch of tests for different languages and subjects HackerRank – excerpt from the website: “Compete in challenges and codesprints and see how […]

Pitfalls of Building Ajax Grid with ASP.NET MVC and jQuery/JavaScript

This article is about pitfalls which should be considered when you’re implementing an Ajax grid with jQuery and ASP.NET MVC. The sample in the article can be used as a starting point to more complicated version of any grid since it provides a complete set of required features: create, edit, delete, filtering, sorting and pagination. […]

Passing AntiForgeryToken to every POST request

The best practice is that all POST request has AntiForgeryToken to prevent XSS attack. If you don’t know what it is, please, read materials in the bottom of the article. From MVC 3.5 there is a special attribute which can be applied to controller actions ValidateAntiForgeryTokenAttribute. It works in pair with HtmlHelper method Html.AntiForgeryToken(). The value […]

Truncate log file of a MSSQL database

From time to time it’s required to clean up log file, but Managment Studio does not offer straightforward command to do that. This script will help in cleaning up.

Issues with serializing JSON response from REST

You might get the following message when trying to serialize a JSON response from a REST service with DataContractJsonSerializer :

If your message looks similar to this example you should check your data contract classes. It’s possible that some property has an invalid type association. For example, the REST service could return complex type Person with […]