Display control hierarchy in winforms application
I recently changed projects and suddenly found myself in a MASSIVE winforms application… Now normally I have no problem navigating massive codebases, after all all you have to do is to right click and...
View ArticleWorking with Enums
Enums are like the small tokens you can use instead of real coins in shopping carts, lockers etc. They really have a very limited use, can always be replaced by something more valuable which also gets...
View Articlemaking C# compare two strings the same way SQL server will
This snippet has served us well public static bool LooksLike(this string value, string other) { if (value == null) { return other == null; } return other != null &&...
View ArticleTruncate a string without truncating/cutting words (if possible)
heres a small snippets we’ve used to try and cut a string at a certain position, but accepting up to N extra letters if that means that we will not truncate in the middle of a word public static string...
View Articleset up a new dev machine IIS sites through script
here’s a powershellscript you can use to script IIS web sites (we update it whenever we add new web sites to the project so everyone is running their sites on the same ports and visual studio doesn’t...
View ArticleEasily check process ID of IIS app pool
Here’s a trick I learned from http://martinnormark.com/iisapp-equivalent-in-iis-7-and-beyond/ create a .bat file called iisapp.bat containing the following: %SystemRoot%\System32\inetsrv\appcmd list wp...
View ArticleIt’s been a year (almost) what’s up?
Last blogpost is from april 2013, what have I been doing in the meantime? Well I’ve mostly been busy working on the same relatively huge and ugly codebase gradually prettifying it and in the process...
View ArticleSql Server In Recovery
So, you just did something potentially stupid. You became impatient while Sql Server was churning away at something and took forever to do a simple small little thing which should take no time at all....
View ArticleÅpent brev til de som vedlikeholder nettbank.handelsbanken.no
Jeg er særdeles lite imponert over passordkravene til Handelsbankens nettbank. Ved å hindre meg i å bruke “spesialtegn” så legger dere opp til at entropien i passordet blir langt mindre enn den kunne...
View ArticleBrilliant Chunking of IEnumerables
I recently needed to chunk a *huge* IEnumerable into manageable chunks (SqlServer only allows _so_ many parameters in a single query (update x where y in *huge ienumerable*) ) So I came across this...
View ArticleASPNET_COMPILER: “Circular file references are not allowed” or “how bad...
Yesterday I came across a cute little bug in our codebase (asp.net) which had me totally stumped for a bit. After a massive change in an underlying API which introduced breakage left and right I had...
View ArticleThe specified service has been marked for deletion
After stopping a windows service (.Net 3.5) through the GUI, I uninstalled it using installutil.exe (commandline), then I tried to install the same service using a newer version of the framework (.Net...
View ArticleBug in PageTypeBuilder 1.3.0 and 1.3.1
Quite a while back I convinced Joel to include a feature in PTB 1.3 which enabled putting PageTypeProperty attributes on interface declarations, which has made my life using PTB a heckuva lot easier,...
View ArticleIntroducing EPiLang
A while back I wrote about how to get strongly typed globalization handling for EPiServer CMS. In the time since I have been playing around with ways to empower administrators of EPiServer sites to...
View ArticleEPiServer CMS 5 / PageTypeBuilder 1.1 / UnmappablePropertyTypeException
I never work on EPiServer projects without PageTypeBuilder anymore, it’s such a great tool, however version 1.1 (the one to use for EPiServer CMS 5) has a really annoying “bug/feature” in it: If you...
View ArticleGetting EPiServer CMS6 to run under Asp.Net 4.0
There’s a couple of gotchas for getting EPiServer to run under .Net 4.0 New default ClientID generation scheme in .net 4 disrupts EPiServer’s javascripts If you find youself getting the following...
View ArticleGet C# 3.5 to work in a T4 template on VS2008
In order to be able to use C# 3.5 in a .tt file on VS2008 you need to hack the devenv.exe.config file located at C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE, adding the following to the...
View ArticleWebActivator / PreApplicationStartMethod
Yesterday I was totally taken aback by the tiny but excellent webactivator project. I totally had a near-magic experience, that’s when I’m almost starting to suspect something works because of tiny...
View Article