ReBuildAll Blog
Thoughts (mostly) on .NET development

TechDays 2010 Finland presentation slides (Finnish Only)   (Debugging)   
Below you can find the slides to my presentation "Web-sovellusten liikenteen debuggaus ja testaus" that I gave at TechDays 2010. They are only available in Finnish. You can also optionally download the demo web application that was used to demonstrate different scenarios with Fiddler. The ZIP archive contains also the SQL script and some simple setup instructions (the latter only in Finnish as well).

Web sovellusten liikenteen debuggaus (PowerPoint)
Demos

You can find Fiddler here:

Fiddler

(The presentation was about Fiddler, the English title could have been: Debugging and testing web-application traffic)

WinDbg Adplus.vbs on Windows 7 with IIS not working   (Debugging)   
I was preparing some WinDbg demos under Windows 7, when I bumped into an issue with ADPlus.vbs. I tried to generate dumps of IIS (W3WP.EXE) when it crashes.

It seems that ADPlus generates "package names" from the Process parameters (how the process was started, command line arguments). It uses then these package names for dump files, CDB configuration files and Exception configurations.

The problem was, that on my Windows 7 machine the W3WP.EXE parametes were a mile long (something over 160 characeters anyway). This meant that when running ADPlus.vbs it failed because of long filenames. It generated the dump directory name and some filenames that went over the 255 limit imposed on non-unicode applications.

First I tried generating dumps into a higher directory - not really ideal, but maybe it could work. Using only a \TEMP folder for the dump output path solved the file name too long problem. However, then came the problem that it was complaining about the Exception configuration. The error message was something like: The command size for the exception [AccessViolation] is [2006] and exceds the allowed limit. You can reduce it's size by using an output directory with a shorter name.

Google helped not this time :(

I ended up adding a quick tweak into ADPlus.vbs. I copied it into ADPlus_custom.vbs and added the following code after line 2550. In case you have a different version, this was in the Sub DumpSelectedProcesses(), after strPackageName was assigned and appended with the package name in the If statement. Right before the variable was printed out with WScript.Echo.

if len ( strPackageName ) > 40 then
    strPackageName = left ( strPackageName, 40 )
end If

I know it is a very dirty hack, but at least it works :)