A collection of technical notes from years of software development work, covering .NET, Windows, and web development topics.
SignalR: Sending Messages to a Specific Client
January 2022
Working ASP.NET MVC code for targeting a specific SignalR client by connection ID using GlobalHost.ConnectionManager.GetHubContext().
WCF Service Trace Viewer
December 2019
Configuring WCF diagnostic tracing with XmlWriterTraceListener to capture service logs that can be analyzed in the Service Trace Viewer tool.
Excel VBA: Writing to a File
August 2019
VBA functions using FileSystemObject for appending lines to a text file and clearing an existing file's contents.
MSTest and Unit Testing Legacy Applications
August 2019
Practical notes on applying MSTest to a legacy application with inline SQL, including how to mock the data access layer to enable unit testing without a live database.
C# Unit TestingQuerying EAV Tables in SQL Server
August 2019
How to query Entity-Attribute-Value tables in SQL Server using self-joins and subqueries to pivot attribute rows into readable columns.
SQL ServerInteracting with the JIRA REST API in C#
June 2019
Working C# code using JToken and JObject to query sprint and issue data from the Atlassian JIRA REST API.
A Free Alternative to XMLSpy
June 2019
Using Eclipse with the XML editor and XPath plugin as a free alternative to XMLSpy for editing and querying XML documents.
XML EclipseMaking a User DBO for All Databases on a Server
March 2019
A dynamic SQL cursor script that creates a login and grants db_owner membership across every database on a SQL Server instance.
SQL Server Partitioned Views
March 2019
Implementing SQL Server partitioned views using UNION ALL across multiple tables, with CHECK constraints to enable partition elimination.
SQL Server DBAAutomatically Posting Messages to Slack
September 2018
C# code using WebRequest to post messages to a Slack channel via the Slack incoming webhook API.
CLR Stored Procedures in SQL Server
September 2018
Step-by-step walkthrough of writing a CLR stored procedure in C#, compiling it to an assembly, and registering it in SQL Server with the required T-SQL commands.
SQL Server C# CLRHTML5 Canvas Clipping
July 2017
How to use the HTML5 Canvas clip() method with save() and restore() to restrict drawing operations to a defined region.
Faster Stored Procedures
January 2017
Practical techniques for tuning SQL Server stored procedures: clustered indexes, parameter sniffing, OPTION(FORCE ORDER), temp tables, in-memory table variables, and cursor optimization.
Fixing the jqGrid XML5656 Error
July 2016
Why an XML5656: Illegal qualified name character error appears when initializing jqGrid, and the missing datatype parameter that fixes it.
How to Generate Random Data in SQL Server
June 2016
A SQL Server stored procedure that generates random alphanumeric strings of a specified length, useful for populating tables with realistic test data.
SQL Server TestingConverting Web Apps to HTTPHandlers
August 2009
How converting ASP.NET web applications to HTTPHandlers simplifies deployment by reducing each app to a single DLL that can be copied across multiple sites.
ASP.NETDEP Causing Visual Studio to Crash
March 2009
The bcdedit commands to disable and re-enable Data Execution Prevention when it causes Visual Studio to crash unexpectedly.
Hyper-V Mistake #1: Never Copy Your VHD
October 2008
Why copying a Hyper-V hard drive image silently discards your snapshots, and why Export is the correct way to move or duplicate a virtual machine.
Hyper-V VirtualizationVolume Shadow Copy DLL Wrapper
June 2008
Notes on building a C++ DLL wrapper for the Volume Shadow Copy Service, including COM interop tips and using dumpbin to inspect VSS library exports.
iTextSharp PDF Tips
March 2008
Working code for generating PDFs with iTextSharp and displaying them in an IFrame, including a JavaScript technique to trigger auto-print once the PDF has loaded.
PDF ASP.NETXSL Relative URLs
September 2007
How to correctly include relative URLs in an XSL document using xsl:attribute, avoiding the double-path bug caused by XSL's lack of relative reference support.
ASP.NET DataGrid Tips
January 2007
Working VB.NET code for three common DataGrid tasks: displaying images in columns, handling page index changes, and styling rows based on their data values.
ASP.NET VB.NETGenerating XML Documentation with SandCastle
November 2006
How to generate MSDN-style HTML documentation from VB.NET XML comments using the VBCommenter PowerToy and SandCastle compiler.
VB.NET Documentation.NET XML Serialization in VB.NET
July 2006
Step-by-step VB.NET code for serializing and deserializing an object to XML using XmlSerializer and MemoryStream, with a complete before-and-after example.