February 2006 Entries

Getting Complete Stack Traces when Using Visual Studio 2005 & WinDbg/SOS

To get complete CLR stacks traces in WinDbg/SOS, you need instruct Visual Studio 2005 to not optimize the code and to create "full" debugging information. In the project properties, Build screen: 1) Clear the check next to Optimize code 2) In the Advanced... dialog box, Debug Info, select full. If either of these aren't done the optimizer will in-line some of the function calls...

Speaking at Code Camp NYC

I'll be speaking at Code Camp NYC, Saturday, February 25th, on Microsoft Debugging Tools for Windows. If you're going to the code camp, I hope you'll attend my talk...

IIS 6.0 Health Monitoring and ASP.NET Applications

IIS 6.0 includes health monitoring for IIS worker processes (w3wp.exe). Unfortunately, from a .NET developer's perspective, this isn't very useful, and is actually less useful than the health monitoring done by ASP.NET when using IIS 5.0. IIS 6.0 can monitor for several unhealthy conditions: too much memory consumption, excessive CPU usage, and non responsiveness (failure to echo pings). There is also this concept of orphaning, where the unhealthy process isn't terminated, it just isn't sent any...

Generating PDB Files for ASP.NET 2.0 Applications

Compilation and deployment of ASP.NET applications has changed drastically in ASP.NET 2.0 (and mostly for the better). During development, builds are just a check for syntax errors, bad references, etc. The compiler output isn't used at run time (on the fly compilation is used instead). Production software, which is precompiled, is created with the new Build -> Publish menu item. Unfortunately, Publish doesn't offer the option to create PDB files for the application. If you want PDB files, you...

User Group Presentations

I speak at user groups on a regular basis and have some presentations people might find useful. The downloads all come with slide decks and sample applications. Multi Threading in Microsoft .NET (Visual Studio 2003) http://njmsdev.org/Meetings... Generics and Iterators in Microsoft .NET 2.0 (Visual Studio 2005) http://www.setfocus.com/N3U... This was created using beta 1 of Visual Studio 2005; one of the samples doesn't compile using...

IBM AFP Print Driver and Window Server 2003 SP1

If you're using the IBM AFP Print Driver (http://www-1.ibm.com/suppo... on Windows Server 2003, your applications may fail if you upgrade to Window Server 2003 SP1. Specifically, calls to the GDI function EndPage may return 0, which has the name ERROR_SUCCESS, and the message "The operation completed successfully." This is caused by the order of particular GDI calls. Specifically, DeviceCapabilities can't be called when the document is active (i. e., in between the calls...

Thread.Abort and interop

One place Thread.Abort could be useful is when interacting with unmanaged code. If you make a synchronous call to unmanaged code, that .NET thread is completely dependent on the unmanaged code to return control. Unfortunately, if the thread hangs, you won't be able to deal with it using Thread.Abort. All calling Thread.Abort does is mark the thread for termination. The termination flag is checked prior to executing each managed instruction. When you're hung in unmanaged code, you never get to executing...

Space consumption in SQL Server

I was asked for statistics on how much space we're using to store various types of data in SQL Server. Of course I said, “Sure, that'll be easy”. Later, after scratching my head and digging around, I discovered the datalength function. This returns, in bytes, the length of fixed length columns and the actual length of variable length columns

Hello World!

After much wondering if I could keep up with blogging, I've decided to take the plunge. I'm David Douglass. I live and work in northern New Jersey and do a lot of development on Windows/.NET. I come across some interesting stuff, which I'll blog on