Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

  • Windows 7 and processor problem

    I am not professional support worker or administrator. Also I have only a little knowledge about hardware. One week ago my computer started doing something weird. Couple of times per day I get BSOD with the following message:

  • Creating DTOs using AutoMapper

    There is one small and nice object to object mapper called AutoMapper. I gave it a little try and I found it very useful. Specially if you have web service and you are using DTOs to move data between client and server. Good news is that AutoMapper is able to perform these mappings and you don't have to write more code than couple of lines. Let’s see example.

  • Refactoring: extract interface

    Extract interface is one of the most common refactoring techniques. Motivation behind extract interface refactoring method is to avoid direct dependencies between classes. Instead of using classes in method calls we use interfaces so we can also use subclasses of those classes we used before. Also we can create brand new classes that use follow these interfaces and we can use these classes instead of current ones.

  • SharePoint: creating SharePoint accounts for Live ID users

    Couple of weeks ago I started adding Windows Live ID authentication support to SharePoint. I used Community Kit for SharePoint and I also made here some notes about it. There was one problem – although user is authenticated there is no SharePoint user and it is not possible assign it to any roles. Here is some advices how to create SharePoint user account when new user is registered after logging in using Live ID.

  • ASP.NET MVC: Ignore requests to favicon.ico

    One problem I faced when writing my example pet portal on ASP.NET MVC was Google Chrome’s request to favicon.ico that doesn’t exist. IE8 that I use (8.0.7000.0) doesn’t make these blind requests to discover that favicon.ico is not there. Solution to my problem was very simple. Just add the ignore rule for favicon.ico to Global.asax file, in the beginning of RegisterRoutes method:

  • SharePoint: Writing messages to ULS (Unified Logging System)

    If you want to make your SharePoint solution more SharePoint way you can write your tracing, debug and error messages to SharePoint log. Easiest way to do it is to write logger by yourself. Btw, SharePoint has class called ULS to write messages to logs but this class is internal and we cannot use it. But it is there.

  • Starting with ASP.NET MVC

    About a week ago I started learning ASP.NET MVC framework. It is pretty cool entertainment for cold winter nights as I found out. Here are the steps I made to get started: