HttpHandler for Excel file download

When providing html links to XML files, typically the HTTP Headers will set ContentType = Plain / Text, and show up in the browser as text. The need is to provide links to Excel files in XML format, and prompt the user to download locally. Once downloaded, the user may open the XML file in Excel. An alternate solution is to…


Create Event Log Sources using PowerShell

Web applications, Windows services, and other applications frequently need to write to an event log on the server. In many cases, it is beneficial to create new event log sources or even new event logs. This allows easier searching for events. Another benefit, in the case of new event logs, this enables custom management of…


Implementing "Most Recently Used" (MRU) in web sites

Internet Explorer 9 (IE 9) introduced the ability to “Pin” a web site to the taskbar. With just a few images, meta tags, JavaScript, and JQuery, web content developers can implement the equivalent of a “Most Recently Used” (MRU) list of pages to their web sites. In so doing, users who frequently return to the same page…


Code Snippets in SQL Server 2012 For Greater Team Productivity

Included in this article: What are snippets? Overview Configuration How to use snippets How to create snippets Example Snippet – Find tables using Sequences WHAT ARE SNIPPETS? SQL Server Code Snippets are what they sound like – they are snippets of code that may be accessed easily through a program such as SQL Server Management…


SQL Server 2012 Sequences in VSTS projects

This post is intended to be a quick reference for creating and using Sequences in SQL Server 2012, as authored in a Visual Studio 2010 project. It’s really pretty simple, but there are a few things to do to make it work properly. While this article discusses Visual Studio 2010, it can easily be extended…


HOW TO: Link directly to TSWA (2008 or 2010 Beta1) work items or queries

To link directly to work items or to run queries in TSWA (Team System Web Access, a component of Team Foundation Server), the following links may provide quick shortcuts. This information is relevant to TSWA 2008 and TFS/TSWA 2010 Beta 1. As 2010 is in beta, I cannot guarantee that the parameters or syntax will…


My first MSDN article

I just published an article entitled “Testing SQL-XML Output by Using XQuery”. I will likely add a few extra notes to the tutorial in my blog site. Please see my article at


PIVOT on two or more fields in SQL Server

The PIVOT function in SQL Server is not used very often in projects I work on, but can be extremely useful for specific kinds of pages, especially when consumed in ASP.NET using GridView objects. Some people struggle with PIVOT on one field, the online documentation should be sufficient for that need. Here is an example…