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.

  • Unity and singletons

    I just putted up Unity behind my test project and had some troubles with singletons. There is some misleading information in documentation you should be aware of. I created one class and one interface, both in same project to save some time.

  • SharePoint import ruins create and modification dates

    When exporting and importing data between SharePoint Server 2007 webs I found interesting bug - item creation and last modification dates will be lost during import. Example - document is created at 05.04.2008. After import I checked out data in manifest.xml. Everything seemed to be correct - also modification and creation dates of documents. After export these dates are incorrect. Instead of original dates I can see date and time of export instead of original dates. Dirty guy as I am I also sniffed around in SharePoint database - I saw correct dates there! But when looking my document library through browser I saw incorrect dates. Does anybody know what is the problem? Is it bug and is there any workaround to this problem?

  • How to bulletproof the loops

    Here is one example about how to bulletproof the loops. This example holds well for legacy code and - of course - for hurry-written-code (that might be the current one, unfortunately).

  • Using Version Class

    When dealing with version numbers we often need to convert them to string and vice versa. There is lot of code where versions are handled manually in code. I don't know why. But I know for sure there is class called Version and I'm sure this class will help us a lot.

  • How to Update SharePoint List Items without Creating New Versions

    Migrating data from SP2001 to MOSS2007 is fun - if you know what I mean. During migration we discovered that migration tool has some serious bugs. I wrote some code that fixes some problems after importing process. There I found a problem - I needed to update list items without getting new versions of them after updates. Usually we see samples like this in internet:

  • Is Automatic Property Same as Property?

    I was listening one session on TechEd (night after long party, yeah) and I was thinking about automatic properties - are they really exact equivalent to usual properties? Something made me suspicious, so I opened my laptop at first free moment and checked out what's going on.

  • Windows Installer and Extensibility.dll

    Windows Installer is one of my favorite problem childs - of course, when it has mysteriuos problems. I found a problem when installing Outlook add-in on machine that has no extensibility features installed on it. Something was missing and installer gave me the famous "Unable to get installer types" error. After pointless waste of time tracing installer and checking its logs I checked out what's going on in file system.

  • Some cool SQL Server user names

    One day when I checked SQL Server messages in Event Viewer I found a long series of unsuccessfull attacks. Somebody desperately tried to guess user names and passwords.

  • C# and question marks

    One cool operators that C# offers us is ?? But before ?? we should know what does ? after variable type name. So, let's take both of these question marks and let's see what they are. Also let's jump for a while behind compilator to see IL code that compiler produces.