Technology Toolbox

Your technology Sherpa for the Microsoft platform

Jeremy Jameson - Founder and Principal

Search

Search

Development

PowerShell Script for Clearing Windows Event Logs

Sure, you can just type "wevtutil el | % { wevtutil cl $_ }" whenever you feel like it, but how fun is that?!

PowerShell Scripts for Managing the Path Environment Variable

Even though it doesn't take long to add a folder to %Path% by clicking through Windows, I prefer to do this using a little PowerShell instead.

PowerShell Scripts for Managing BackConnectionHostNames (KB 896861)

Here's a set of scripts to make it easier to view the items in the "BackConnectionHostNames" registry key, as well as add and remove hostnames.

PowerShell Scripts for Managing the Hosts File

Here's a set of scripts to make it easier to view the hostname mappings in the hosts file, as well as add and remove hostnames.

Some Tips for Managing TFS Workspaces

Are you familiar with the "tfpt scorch" command? Have you ever used PowerShell to quickly cloak/uncloak folders in your TFS workspaces? If not, here are a couple of tips that could save you a little time.

"Development Cheat Sheets"

In this post, I explain how I like to use Microsoft OneNote to manage what I call "development cheat sheets" -- which are especially useful when developing SharePoint solutions.

Just say "no" to writing SharePoint CAML queries from scratch

Do you use the U2U CAML Query Builder instead of writing CAML queries from scratch? If not, then you must really know your SharePoint (or perhaps you just enjoy making things harder than they need to be).

Import website (IIS) logs into SQL Server using Log Parser and PowerShell

Here's a little PowerShell script I whipped up to import the TechnologyToolbox.com log files into a SQL Server database for some "quick and dirty" analysis.

Why I chose not to programmatically filter errors reported by ELMAH

If you think that programmatically filtering errors in ELMAH is as easy as specifying filters in Web.config, you might be in for a surprise.

Unit tests for filtering errors in ELMAH

In my previous post, I briefly mentioned the unit tests I created while trying to figure out why my ELMAH filter was not working as expected. Well, here they are for your enjoyment (or idle curiosity).

Filter ELMAH email messages to avoid getting spammed by hackers

I finally got around to configuring an ELMAH filter for the TechnologyToolbox.com website (so I wouldn't be bothered by frequent email messages due to failed hack attempts). During the process, I also discovered a couple of bugs in ELMAH (and learned a lot more about the internal workings of ELMAH).

Packaging a code sample using PowerShell

Here is the PowerShell script I developed to avoid accidentally including "junk" in code samples I create for my blog.

Zip a folder using PowerShell

There are a couple of options for creating a zip file for a specific folder. You can either use a third-party solution (like the PowerShell Community Extensions) or do it all with "out-of-the-box" functionality.

Use PowerShell to alleviate the pain of code coverage analysis in Visual Studio 2010 and .NET 3.5 solutions (e.g. SharePoint 2010)

This PowerShell script makes it much easier to perform code coverage analysis in Visual Studio 2010 and .NET Framework 3.5 solutions (e.g. SharePoint 2010).

Code coverage analysis with Visual Studio 2010 and .NET 3.5 solutions (e.g. SharePoint 2010)

It takes a little more work than expected, but you actually can "have your cake and eat it too" when it comes to Visual Studio 2010 code coverage analysis and .NET Framework 3.5 solutions (e.g. SharePoint 2010).

Use protocol-relative URLs to avoid mixed mode content

Here's a great tip I picked up from Phil Haack a few weeks ago for avoiding those pesky warnings like "Only secure content is displayed."

HTML-to-PDF converters

Looking for a solution to convert from HTML to PDF? Here is a list of the products I discovered during my research as well as the results of the head-to-head competition.

Be careful when using the SharePoint PublishingPage.Url property

Intellisense isn't helpful when the underlying XML documentation in the code is wrong.

Supporting both "domain.com" and "www.domain.com" (a.k.a. Building TechnologyToolbox.com, part 23)

Can visitors browse your website using "domain.com" as well as "www.domain.com"? Is this documented in your test spec? It should be -- as I found out...the hard way.

Is directory browsing enabled or disabled on your website?

Starting with IIS 6, directory browsing is disabled by default -- but are you really sure this is the way your website is configured?

Implementing Google Analytics (a.k.a. Building TechnologyToolbox.com, part 22)

In yesterday's post, I described how I integrated Google Site Search into the Technology Toolbox website. This post provides a similar walkthrough for implementing Google Analytics.

Implementing Google Site Search (a.k.a. Building TechnologyToolbox.com, part 21)

In this post, I provide another step-by-step walkthrough of a feature, this time sharing the details of how I implemented the search functionality on TechnologyToolbox.com.

Creating a simple "Contact" form in ASP.NET (a.k.a. Building TechnologyToolbox.com, part 20)

In this post, I explain the iterative approach used to create the "Contact" form for the Technology Toolbox website. Through a sequence of 9 discrete steps, I describe my typical development process from initial concept to what I call "feature complete."

More bug fixes for Subtext now available on GitHub (a.k.a. Building TechnologyToolbox.com, part 19)

In addition to the trivial bug fix that I mentioned in last night's post, I have merged a number of other changes into my Subtext fork on GitHub.

Git/GitHub issues

Follow along as I share my struggles using GitHub and the Git version control system.

My first bug fix for Subtext now available on GitHub (a.k.a. Building TechnologyToolbox.com, part 18)

I finally got around to investigating all the hubbub with GitHub. I even submitted my first "official" bug fix for the Subtext blog engine. I'm sure it will get easier, but this experience was valuable for me, if for no other reason than making me appreciate how much I love Team Foundation Server.

Shared files and assemblies in ASP.NET applications (a.k.a. Building TechnologyToolbox.com, part 17)

This post describes a couple of scenarios where you might need to share files and assemblies within an ASP.NET website, as well as some tricks for making this completely painless (from a development and deployment perspective).

Custom CAPTCHA control for ASP.NET application and Subtext blog (a.k.a. Building TechnologyToolbox.com, part 16)

In this post, I provide a detailed walkthrough of the custom CAPTCHA control used on the Technology Toolbox website (including some subtle issues discovered when using this control on Subtext blog pages).

Errors running the Subtext blog engine -- and what I did about them (a.k.a. Building TechnologyToolbox.com, part 15)

I've been running my new blog on Subtext for almost 4 months and encountered some issues with Subtext that required a few tweaks here and there. In this post, I describe the errors I've seen and my recommendations for addressing them.

Best practices for error handling in ASP.NET Web applications (a.k.a. Building TechnologyToolbox.com, part 14)

So, you've created a custom error page, enabled the <customErrors> element in the Web.config file, and considered it done -- but are you sure that all the bases are covered?

Serving minified jQuery/CSS in PROD and uncompressed versions in DEV (a.k.a. Building TechnologyToolbox.com, part 13)

In this post, I show how to serve minified versions of JavaScript and CSS files in Production environments and uncompressed versions in Development environments.

Using jQuery to create an expandable archive list for blog posts (a.k.a. Building TechnologyToolbox.com, part 12)

In my previous post, I briefly mentioned how I use a CSS sprite and jQuery to render the expandable list under the "Archives" section on the various blog pages of the Technology Toolbox site. This post details the implementation of that feature.

Using CSS sprites to improve site performance and user experience (a.k.a. Building TechnologyToolbox.com, part 11)

In my previous post, I briefly mentioned how the "Most Popular Posts" section on the Technology Toolbox home page uses a CSS sprite to render the arrow image next to each list item. In this post, I explain more about how CSS sprites are used on the site, why they are valuable, and some caveats when using them.

Using the Entity Framework and LINQ to list the most popular posts from Subtext (a.k.a. Building TechnologyToolbox.com, part 10)

In my previous post, I shared the inner workings of the "Most Recent Posts" section on the Technology Toolbox home page. In this post, I'll show you how I built on that foundation to generate the content for the "Most Popular Posts" section.

Using the Entity Framework and LINQ to list the most recent posts from Subtext (a.k.a. Building TechnologyToolbox.com, part 9)

In a previous post, I mentioned how the new Technology Toolbox home page highlights the most recent blog posts from Subtext. In this post, I'll show you how easy this feature was to develop -- thanks to the Entity Framework and LINQ.

Tips & Tricks for Running PowerShell Scripts as Scheduled Tasks

In my previous post, I described the PowerShell script used to rebuild the Development environment for TechnologyToolbox.com on a daily basis. This post explains the subtleties of running the script -- or, more generally, any PowerShell script -- using the Windows Task Scheduler...

PowerShell script to deploy/rebuild an ASP.NET Web application (a.k.a. Building TechnologyToolbox.com, part 8)

In this post, I describe the PowerShell script used to rebuild the Development and Test environments for TechnologyToolbox.com. From a high-level perspective, the script deletes the IIS website (if it exists), creates a new website (including the corresponding application pool), and then copies the files for the main site as well as the Subtext files for the /blog application...

Refresh Development and Test environments with Production database (a.k.a. Building TechnologyToolbox.com, part 7)

In this post, I'll show you how I quickly restore the Production database for TechnologyToolbox.com to the corresponding Development and Test environments...

Migrating a blog from Telligent to Subtext using Web scraping, the Html Agility Pack, BlogML, and more (a.k.a. Building TechnologyToolbox.com, part 6)

While I don't expect many people will need to migrate blog posts from Telligent to Subtext, I do believe it is valuable to provide a walkthrough of how I typically approach a "content migration scenario" -- since I frequently encounter this kind of requirement when working with enterprise customers...

Semantic HTML for blog pages based on hAtom 0.1 microformat (a.k.a. Building TechnologyToolbox.com, part 5)

While creating the new TechnologyToolbox.com site, one of my first tasks was to define the structure of the HTML for the blog pages. I briefly considered using my old MSDN blog as a reference. However, I quickly dismissed that option after viewing my MSDN blog home page with CSS disabled...

Feedburner not showing your latest blog post? Your feed probably exceeds 512K.

This morning I discovered that Feedburner wasn't showing the blog post I created last Thursday. No error was displayed. Rather the RSS feed simply made it look like...

Creating a style guide and color palette for a Web application (a.k.a. Building TechnologyToolbox.com, part 4)

In my previous post, I described how I typically create a "static HTML prototype" for an ASP.NET or SharePoint Web application. By working directly in HTML at the beginning, I can rapidly define the structure of the content and subsequently create the corresponding CSS rules to style the pages...

Creating a static HTML prototype for a website (a.k.a. Building TechnologyToolbox.com, part 3)

Regardless of the platform a website will eventually run on (e.g. ASP.NET or SharePoint), I typically recommend creating a static HTML prototype to demonstrate key features, illustrate various design alternatives (e.g. different page layouts, color schemes, etc.), and gather feedback...

Setting up a new Web development project (a.k.a. Building TechnologyToolbox.com, part 2)

Once I settled on using Subtext as the blogging solution for the Technology Toolbox site, I turned my attention to working on the other areas of the site...

Why was Subtext selected for TechnologyToolbox.com? (a.k.a. Building TechnologyToolbox.com, part 1)

In my previous post, I mentioned how my new blog is currently powered by Subtext -- or rather my own (slightly modified) version of Subtext 2.5. I also noted that Subtext wasn't my first choice when selecting a blogging solution...

Introducing TechnologyToolbox.com

In this inaugural post for my new blog location, I'll introduce various features of the new Technology Toolbox website and provide a high-level overview of the underlying architecture. Subsequent posts will cover different aspects of the site in greater detail.

RecoverableException for .NET Framework Solutions

Do you remember the good ol' days before the ApplicationException class in the .NET Framework became " persona non grata "? I sure do. If you were to look at .NET code that I wrote years ago, you'd probably see ApplicationException being used all over...

Internet Explorer 9 Upgrade

Two years ago, I wrote a post about upgrading to Internet Explorer 8 . Well, in case you missed the announcement a couple of days ago, Internet Explorer 9 has been released. Woohoo! It's been a long time coming, but I believe the wait has been well...

"Build Bloat", Part 2 (a.k.a. Removing Extraneous Items from SharePoint Visual Studio Projects)

Last week I received a "Logical Disk Free Space is low" alert from Operations Manager for my TFS 2010 build server (DAZZLER). After a few minutes investigating the issue, I discovered that my "Builds" folder was consuming a little over 2 GB of storage...

Thoughts and Recommendations on Using Iterations in TFS

Have you ever lost work items in Team Foundation Server? I know I have. Well, let me clarify that...it's not that I actually lost work items due to some bug in TFS or failure on the database server. Rather -- and I'm a little embarrassed to admit this...

Building SharePoint 2010 Solutions on a TFS 2010 Build Server

Last year I wrote a post about building Microsoft Office SharePoint Server (MOSS) 2007 solutions on a Team Foundation Server (TFS) 2010 build server , which talked about copying various SharePoint assemblies to a "Reference Assemblies" folder and adding...

Web Standards Design with SharePoint, Part 3

Last week I received the following comment on a blog post I wrote last year regarding Web standards design with Microsoft Office SharePoint Server (MOSS) 2007: "The Media Guy" Great article.. was very helpful. I used 960.gs for my master page...

Issues Debugging Managed Code in WinDbg with SOS and PSSCOR2 (e.g. "Failed to request ThreadStore")

Yesterday I found myself back in "WinDbg-land" after a long, long time (since 99% of my debugging is performed in development environments using Visual Studio). However, I couldn't get the managed code debugging to work in WinDbg. I initially tried...

A Modal Popup Framework Based on the AJAX Control Toolkit

The "Announcements" feature that I developed for a customer about a year ago uses a modal popup window to display content to users. The solution leverages the AJAX Control Toolkit to render the modal popups – specifically the ModalPopupExtender...

A Custom SqlRoleProvider for "Authenticated Users"

Prior to the recent "v2" release on my current project, we had been using the ASP.NET SqlRoleProvider to manage the various roles used by the Web site. Over a month ago, someone contacted me about an issue he was encountering with a specific user....

ProcDump - An Easier Way to Create a Mini-Dump

In a previous post , I mentioned an issue I've been having with Expression Web 4 crashing on me. In that post, I mentioned a few ways that you can create a mini-dump for a process (e.g. with Visual Studio, WinDbg, or ADPlus). A couple of weeks ago...

Branching for a Release in Team Foundation Server

In my previous post , I mentioned that one of the recurring tasks I create in TFS each time I start a new iteration on a project is something like "Create branch for Sprint-10" (the iteration specified in the title of the work item obviously varies each...

Recurring Tasks in Team Foundation Server

While the vast majority of work items created for each iteration (sprint) are unique and therefore require some planning effort beforehand, I've gotten into the habit of creating a few recurring tasks in TFS each time I start a new iteration on a project...

Bypassing a Gated Check-in in TFS 2010

Yesterday someone contacted me about my earlier post on Incrementing the Assembly Version for Each Build in TFS 2010 , because after following the steps I provided, he encountered a problem due to the fact that he had previously configured a gated check...

Web Standards Design with SharePoint, Part 2

In the first part of this series, I explained one approach for building Web sites in Microsoft Office SharePoint Server (MOSS) 2007 based on Web standards and the 960 Grid System . I had intended on following up with a sample solution based on a fictitious...

My Initial Thoughts on Microsoft Visual Studio Scrum 1.0 (TFS 2010 Process Template)

I've been using the new Scrum template for Team Foundation Server 2010 for a little over three weeks now -- not on a real project, admittedly, but rather on a sample project that I've been working on. [On the customer project that I've been working on...

Incrementing the Assembly Version for Each Build in TFS 2010

Update (2010-12-03) If you are using gated check-ins, be sure to also read my follow-up post: Bypassing a Gated Check-in in TFS 2010 http://blogs.msdn.com/b/jjameson/archive/2010/12/03/bypassing-a-gated-check-in-in-tfs-2010.aspx Earlier this...

Create a Custom "Builds" List on Your TFS Project Portal (a.k.a. SharePoint Team Site)

One of "tweaks" that I commonly make to the SharePoint team site created for each project in Team Foundation Server is to create a custom list to track the important builds for the project (typically corresponding to each milestone or iteration). There...

Avoid Issues with Caching by Using "Theme Versions"

In a previous post discussing Web standards design, I mentioned how I like to use "Theme" folders to organize CSS files and related images that define a specific look-and-feel for a site. For example, suppose we are tasked with building the Internet...

Recovering Your Work After an Expression Web Crash

I am getting a little tired of Expression Web 4 crashing on me. I'm not sure why I'm repeatedly encountering issues with the latest version of Expression Web, but I suspect -- given the frequency at which it is crashing -- it may have something to...

Removing Downloaded Program Files (e.g. ActiveX Controls) in Windows 7/IE 8

In the latest sprint on my current project, we are adding yet another major feature to a customer service portal -- specifically, the ability to view live video feeds from security cameras. The vendor this particular customer has selected for providing...

Reporting Errors with TFS Migration/Upgrade

When upgrading Team Foundation Server (TFS) -- or, really, any application that utilizes SQL Server Reporting Services -- you might choose to restore your data to a new environment (for example, to migrate to new hardware, or to validate the upgrade in...

Performing a "Do Over" with TFS 2010 Upgrade

Regardless of whether you call it a "mulligan", a "do over", or whatever, the fact is you may encounter errors during your upgrade to Team Foundation Server (TFS) 2010 -- hopefully in your Development or Test environment first, not when upgrading your...

Avoid the Warning from Excel Services About Refreshing External Data

In my post earlier this month on upgrading to Team Foundation Server (TFS) 2010 and SharePoint Server 2010 , I forgot to include the steps to change the Warn on Refresh setting of the trusted file location for the Excel Services Application. If you...

Use PowerShell to "Reset to Site Definition" in SharePoint Server 2010

In one of my posts last month , I provided the following steps to "reghost" all of the pages in a Team Foundation Server (TFS) project site: Browse to the Site Settings page for the site (e.g. http://cyclops/sites/Demo/_layouts/settings.aspx )....

Upgrading TFS 2005/2008 Project Sites to TFS 2010, Part 3 - Quick Launch Navigation

Update (2010-05-20) I made some changes to correct a few issues and also to include the final version of the XML input file that I used to update my TFS project sites. In my previous post , I showed how you can use PowerShell to export the quick...

Upgrading TFS 2005/2008 Project Sites to TFS 2010, Part 4 - Project Work Items Web Part

In the part 1 of this series , I described how to enable the dashboard functionality in Team Foundation Server (TFS) 2010 on project sites upgraded from TFS 2005/2008 (i.e. sites originally created with the MSF Agile v4.x process templates). I noted that...

Upgrading TFS 2005/2008 Project Sites to TFS 2010, Part 2 - Team Wiki

In part 1 of this series , I showed how you can add new Team Foundation Server (TFS) 2010 dashboard functionality to project sites originally created in TFS 2008 (or TFS 2005). Another feature that you might want to add to upgraded project sites is...

Upgrading TFS 2005/2008 Project Sites to TFS 2010, Part 1 - Agile Dashboard Features

In one of last week's posts , I provided details on upgrading from Team Foundation Server 2008 to TFS 2010, including some information about updating your TFS project sites. I also provided a reference to the following MSDN article for more information...

Error 7493 ("Access is denied") Viewing TFS Dashboard in SharePoint Server 2010

Earlier this morning I was upgrading some of my Team Foundation Server (TFS) project sites (many of which were originally created with TFS 2005) in order to showcase the new dashboard features in TFS 2010. While doing so, I encountered the following...

C++ Compiler in Visual Studio 2010 Must Target .NET Framework 4

Another "hiccup" this week after upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010 ... This morning I discovered that when you upgrade a managed C++ project from Visual Studio 2008 to Visual Studio 2010, the project is updated...

Suppress CS1607 Warning for TFS 2010 Builds

Here's another issue I encountered when upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010 ... While it's generally a good assumption that a solution that builds without error in Visual Studio 2008 (and on a TFS 2008 build server...

Updated Path to tf.exe for TFS 2010 Builds

After upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010 , I found that I needed to tweak my TfsBuild.proj file in order to successfully build on my new TFS 2010 build server. In a previous post, I detailed the process that I recommend...

Building MOSS 2007 Solutions on a TFS 2010 Build Server

After upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010 , my next step was to upgrade various Visual Studio solutions to the 2010 version and ensure they built successfully after the upgrade. Note that during the upgrade, I chose...

"The workbook cannot be opened" Error with SharePoint Server 2010 (and TFS 2010)

In an earlier post today, I described how I recently upgraded from Team Foundation Server 2008 (and Windows SharePoint Services v3) to TFS 2010 (and SharePoint Server 2010). While most of the upgrade went fairly smooth, during the process I discovered...

Upgrade Team Foundation Server 2008 to TFS 2010 (and SharePoint Server 2010)

In my previous post , I provided an overview of the process of upgrading from TFS 2008 (and Windows SharePoint Services v3) to TFS 2010 (and SharePoint Server 2010). In this post, I provide more details about the upgrade process. Note that if you are...

Upgrade Team Foundation Server 2008 to TFS 2010 (and SharePoint Server 2010) - Overview

This past weekend, I upgraded my Team Foundation Server (TFS) 2008 environment to TFS 2010. I also upgraded the TFS project sites to SharePoint Server 2010. Why the SharePoint upgrade? The TFS project sites previously ran on Windows SharePoint Services...

Save Significant Disk Space by Setting MaxPatchCacheSize to 0

A little over two years ago, I wrote a post about installing Visual Studio 2005 Service Pack 1 , in which I mentioned setting the MaxPatchCacheSize registry setting to 0 (in order to save some significant disk space while installing the service pack)...

Custom Table Headers With the ASP.NET GridView Control

In my previous post , I showed an example KPI dashboard for a Web application with a table similar to the following: Key Performance Indicators (Detail) Site 2009 Q3 2009 Q4 2010 Q1 Thresholds Duncan 93% 95% ...

Test Projects in Visual Studio 2010 Must Target .NET Framework 4

Last week I installed Visual Studio 2010 on my primary desktop. This morning, I opened my Fabrikam.Demo solution in the new version of Visual Studio, but chose not to upgrade the target framework when prompted by Visual Studio during the solution upgrade...

Leveraging the Power of Typed DataSets, IEnumerable<>, and LINQ

In my previous post , I extolled my love of typed DataSets in .NET because they are not only quick to design and update, but also very easy to understand. Essentially, if you can read an entity-relationship model (à la ERwin or a Visio database...

Still Crazy (About Typed DataSets) After All These Years

First off, my apologies to Paul Simon regarding the title of this blog post -- but I simply couldn't resist ;-) When architecting and building solutions for customers, I tend to make heavy use of typed DataSets. I believe I used them on my very...

Disable Pinging of Your Application Pool Worker Process in IIS

Yesterday I was doing another "Knowledge Transfer" session and before I started walking through some code in a debugging session, I took a brief detour to show the team how I recommend disabling the "ping" functionality in IIS for your application pool...

Test-Driven Development (TDD) in the Real World, Part 3 (a.k.a. the EncryptionService)

In my previous post , I provided a walkthrough of Test-Driven Development (TDD), based on a very simple scenario (truncating a string to a specific number of characters). In this post, I'll provide another example using a more complex scenario. Suppose...

Test Driven Development (TDD) in the Real World, Part 2

In part 1 of this post, I provided my high-level thoughts on doing Test Driven Development (TDD) in the real world, but I didn't get around to walking through an actual sample. To start off simple (but still real world), let's imagine we have a scenario where we need to truncate a string to a limited number of characters for display or output purposes. However, instead of just chopping off the string at the specified number of characters, we want to apply a little "intell

TDD in the Real World, Part 1

Earlier today I presented a "Knowledge Transfer" session to a team of developers on my current project. If you've ever worked with consultants, you've probably experienced a "KT" session or something similar. In essence, it's just a meeting intended to...

Automated Deployments to DEV from the Latest Build Folder

Last month I wrote a post detailing how to increment the assembly version for each build . However, incrementing the assembing version is only part of my recommended build and deployment process . The following figure illustrates how deployments to...

Unit Tests for ICloneable

A few years ago I developed a class ( SharePointSearchUrlBuilder ) for working with SharePoint Search URLs. The class is used to easily build or parse the various query string parameters used by SharePoint Search (e.g. keywords, search scope, additional...

Incrementing the Assembly Version for Each Build

Last summer I wrote a post about best practices for .NET assembly versioning and made the following statement: The AssemblyFileVersionAttribute should be incremented automatically as part of the build process. In the comments for that post, someone...

Logging Exceptions in .NET Applications

Last summer I wrote a post introducing my simple, but highly effective approach to logging -- including a Logger class that is really just a thin wrapper around the System.Diagnostics.TraceSource class. A few months ago, I enhanced the Logger class...

Avoiding Problems with the Using Statement and WCF Service Proxies

I encountered a rather nasty issue yesterday on my current project -- a customer portal built on Microsoft Office SharePoint Server (MOSS) 2007 that integrates with multiple external systems via Web services. The database indexes for one of the external...

Lessons Learned Moving TFS to Windows Server 2008 and SQL Server 2008

I've been a bad blogger this month. Almost a month ago, I wrote a post about using Web standards with Microsoft Office SharePoint Server (MOSS) 2007 , but I noted that there would be more to come on that subject in the near future. Well, almost a full...

Web Standards Design with MOSS 2007, Part 1

I've mentioned before that I became somewhat of a Web standards zealot several years ago. Consequently, regardless of whether I'm building Web sites using the core ASP.NET platform or Microsoft Office SharePoint Server (MOSS) 2007, I strive to ensure...

Lessons Learned Integrating Silverlight in MOSS 2007, Part 3

Yesterday I continued building upon part 1 in a series of posts regarding the use of Silverlight in an Internet-facing customer portal built on Microsoft Office SharePoint Server (MOSS) 2007. As I mentioned in the previous posts, the Silverlight application...

Lessons Learned Integrating Silverlight in MOSS 2007, Part 2

This is a continuation of yesterday's post detailing some lessons learned while integrating a Silverlight application into an Internet-facing customer service portal built on Microsoft Office SharePoint Server (MOSS) 2007. As I mentioned in the previous...

Lessons Learned Integrating Silverlight in MOSS 2007, Part 1

The November 2008 edition of MSDN magazine contained the following article: Light Up SharePoint With Silverlight 2 Web Parts http://msdn.microsoft.com/en-us/magazine/dd148643.aspx While the article provides a good introduction to integrating...

"Build Bloat" and Removing Extraneous Items from TFS Builds

This week I am wrapping up the third sprint (a.k.a. iteration or milestone ) on my current Microsoft Office SharePoint Server (MOSS) 2007 project. Although, honestly, I wasn't involved all that much in Sprint-3, since I was on vacation for the vast majority...

Bug Deploying SQL Server Database Using VSDBCMD.EXE

Yesterday we encountered a bug while trying to deploy a new SQL Server database from a Visual Studio database project using the VSDBCMD.EXE utility, following the prescriptive guidance on MSDN: How to: Prepare a Database for Deployment From a Command...

Building SharePoint WSPs with Team Foundation Build

As I noted in my previous post , I recently discovered that my approach for building Web Solution Packages (WSPs) in Microsoft Office SharePoint Server (MOSS) 2007 isn't compatible with Team Foundation Build. I'm actually a little embarrassed to say...

The "Copy Local" Bug in Visual Studio

If you've ever worked with me on a Microsoft Office SharePoint Server (MOSS) 2007 project -- or if you've read my Sample Walkthrough of the DR.DADA Approach to SharePoint -- then you've probably seen the following comment: Note: Referenced assemblies...

SketchPath - The XPath Tool

I added another tool to my Toolbox yesterday: SketchPath. The SketchPath site labels it as "The XPath Tool" but I'd say it more like " The XPath Tool." I've seen a few other tools for quickly building and testing XPath expressions against an XML...

Compiling C++ Projects with Team Foundation Build

As I mentioned in my previous post , this week I incorporated Password Minder into my "Toolbox" Visual Studio solution that is scheduled to build daily through Team Foundation Server (TFS). It's not that I really need daily builds of Password Minder;...

Microsoft Translator Widget

This week I stumbled upon the new (and very cool) Microsoft Translator Widget . Actually, this isn't really new (apparently it has been available for over six months now) but it was certainly new to me. A colleague of mine on a previous project...

Constraining Tables with CSS

Have you ever wanted to display data in a table but limit the size of the rows and columns within the table? For example, consider the classic master/detail view that we often find in software applications, in which items are shown in a summary table...

Recommendations for Code Analysis

In my previous post , I briefly mentioned the Code Analysis feature of Visual Studio in the context of using check-in policies with Team Foundation Server (TFS). However, there's a lot more to talk about with regards to using Code Analysis. If you...

Recommended Check-In Policies for Team Foundation Server

I love using Team Foundation Server (TFS). There's just an amazing amount of "goodness" for software development that comes out-of-the-box; and there's even more available from Microsoft and other sources in the form of add-ons (many of which are free...

Latest Version of Opera Ignores Hosts File

As I mentioned in my previous post , I discovered a rather nasty UI bug last week with the new portal we are building for a customer. Unfortunately, the layout issue only occurred in the Safari browser. Since I couldn't repro the issue in Internet...

Troubleshooting Layout Problems with Safari

I discovered a rather nasty UI bug last week with the new portal we are building for a customer. Unfortunately, the layout issue only occurred in the Safari browser. Even worse, I discovered it only a day before the CEO of customer discovered it himself...

DataNavigateUrlFormatString Does Not Allow "javascript:"

I encountered an interesting bug last Friday with the ASP.NET HyperLinkField control. To understand the scenario, think of the typical "view detail" feature when showing summary data in a table. In other words, you want to provide users the ability to...

Essential Add-Ins for Team Foundation Server

In a previous post , I mentioned how I use SourceGear's DiffMerge instead of the out-of-the-box tool that comes with Team Foundation Server (which is also called DiffMerge). If you haven't at least evaluated the SourceGear alternative, I definitely advise...

Add Rooler to Your Web Development Toolbox

This past May, one of my colleagues notified me of a new tool called "Rooler" that allows you to easily measure anything displayed on your screen. I definitely consider this tool a "must have" for anyone out there doing Web development. While tools...

KB 896861 and "Microsoft Fix it"

A couple of days ago, I rebuilt one of my development VMs for Microsoft Office SharePoint Server (MOSS) 2007. As I've noted in a previous post , I've found that I need to apply one of the registry hacks described in the following KnowledgeBase article...

Formatting Code for My Blog

It occurred to me this morning that while I previously shared some details on how I manage my MSDN blog , I've never shared my method for formatting code for the Web. Actually, calling it "my method" is definitely a bit of a stretch. I certainly didn...

"Web-Enabled" Projects and F5 Debugging with SharePoint

In yesterday's post , I provided a sample walkthrough of the "DR.DADA" approach to developing solutions for Microsoft Office SharePoint Server (MOSS) 2007. However, I intentionally left out a few things because a) that post was already getting ridiculously...

Best Practices for SCM and the Daily Build Process

In a previous post, I briefly discussed a simple branching strategy for Team Foundation Server (TFS). This was somewhat of a follow-up to another post in which I briefly referenced a great article titled The Importance of Branching Models in SCM . If...

Build and Deployment Overview

This post provides a high-level walkthrough of the build and deployment process that I typically recommend on projects that I am involved with. It includes a series of illustrations that capture key concepts at various points in time. Specific parts of...

Debugging Symbols -- They're Not Just for Debug Builds Anymore

I started another new project this week. Typically one of the first tasks on any new development project is to create a Development Plan that provides consistent guidelines and processes for the Development team. On this new project, another Microsoft...

Development and Build Environments

In a previous post , I briefly touched on the "DEV-TEST-PROD" triad of environments that I typically recommend (at a minimum) for every organization doing any form of software development. This post describes, in greater detail, the various environments...

Comparing Source Code Branches

During the more than three years I spent helping Agilent Technologies migrate their Internet site from their legacy, proprietary platform to Microsoft Office SharePoint Server (MOSS) 2007, we unfortunately never used Team Foundation Server (TFS). Instead...

Expression Web, My MSDN Blog, and (Now) Team Foundation Server

In case you haven't picked it up from some of my previous posts, I became somewhat of a "Web standards zealot" back in 2006 while creating a "community site" for a local organization of mental health professionals and attorneys that help children and...

Using SysPrep'ed VHDs for New Hyper-V Virtual Machines

As noted in my previous post , I spent 7 days in "alpha" training last week for SharePoint 2010. Consequently, one of my goals for this week was to update my "dogfood" VM with the CTP build of SharePoint Server 2010, so that I can continue building...

Creating Wireframes for Page Layouts

When helping customers migrate their Internet sites to Microsoft Office SharePoint Server (MOSS) 2007, I've found it very helpful to create wireframes showing the various fields, Web Parts, and master page content. For the last several years, I've been...

Configuring Logging in ASP.NET Applications (and SharePoint)

This post continues on the original post for my simple, but highly effective approach to logging and the follow-up post which introduced configuring logging for console applications . Obviously not all solutions are simple console-based applications...

Configuring Logging in a Console Application

In my previous post, I introduced my simple, but highly effective approach to logging . As promised, this post introduces how to configure logging (based on a simple console application). As noted in my previous post, one or more trace listeners can...

A Simple, but Highly Effective Approach to Logging

A common question that frequently arises both with customers and fellow consultants is what do I recommend for logging? As experienced software developers, we know that there are going to be errors in our solution -- as well as other important events...

Environment Naming Conventions

One of the challenges I see in organizations that I work with is the lack of naming conventions for various environments -- or sometimes naming conventions that provide little or no value. For about the last ten years, I've been a strong proponent...

Tell Mode vs. Ask Mode

The project I am currently working on is nearing the end. Last week we reached our "Feature Complete" milestone and now we have formally transitioned into the "Stabilizing" phase. In a couple of team meetings this week, I mentioned the concepts of...

Shared Assembly Info in Visual Studio Projects

Yesterday I introduced the concept of linked files in Visual Studio solutions with a follow-up on my recommendation for configuring a custom dictionary to eliminate CA1704 code analysis warnings. Another practical application of linked files is what...

Best Practices for .NET Assembly Versioning

Whenever a new .NET assembly project is created in Visual Studio, a file named AssemblyInfo is created that contains attributes used to define the version of the assembly during compilation. Using assembly versions effectively enables various team...

CA1704 Code Analysis Warning and Using Custom Dictionaries in Visual Studio

In my previous post , I introduced the concept of linking files in Visual Studio solutions. A good use of this feature is specifying a custom dictionary for your solution. Once you enable Code Analysis on your projects, you are likely to encounter...

Linked Files in Visual Studio Solutions

A couple of years ago, I wrote a post introducing my system for structuring Visual Studio solutions . However, I apparently forgot to post a follow-up providing additional details, such as configuring assembly versioning and what I like to call "shared...

Temporary ASP.NET Files Are Not Deleted

Yesterday afternoon, I discovered that there were 64,725 items (consuming 2.41 GB) in the C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root folder of my development VM for Microsoft Office SharePoint Server (MOSS) 2007. Apparently...

Redirecting stderr to stdout

Yesterday I replied to an email from a teammate in which I incorrectly stated that you can't redirect stderr to stdout in DOS -- er, I mean a command window in Microsoft Windows. I would have sworn the last time I tried something like the following...

XSLT "Identity Transform"

Last week, I was explaining to a teammate that it is often helpful to use the XSLT "Identity Transform" in order to view the raw XML -- in other words, without any "real" transformation by the XSL stylesheet. For example, suppose you need to customize...

DiffMerge - A Better Differencing Tool

Last summer, I added DiffMerge to my Toolbox and I haven't used WinDiff since. DiffMerge can do everything WinDiff can, plus a whole lot more -- like intra-line highlighting, merging, and comparing files using configurable rulesets (although you'll...

Internet Explorer 8 Upgrade

In case you missed the announcement, Internet Explorer 8 was released last week. I'll be honest, I tried one of the early betas of IE8 on a VM a long time ago, but I didn't spend a lot of time with it because it always seemed like there was some more...

To Dispose or not to Dispose -- that is the question

Last Saturday, another team member sent an email out to the team inquiring about the "MOSS object disposal problem" (as he termed it). Essentially, he was asking if anytime he referenced the ParentWeb property on an object, whether or not he needed...

ArgumentNullException with Optional PublishingPage.Description Property (with some thoughts on breaking the build, too)

Yesterday morning I broke the build. Ouch. Technically speaking, the changes that I checked in did not break the build, per se, but rather my changes caused a nasty ArgumentNullException while redeploying our SharePoint site. In "Developerspeak...

Visual Studio Macro for Collapsing All Items in Solution Explorer

Along with my Visual Studio macros for unloading/reloading projects in a solution , another macro that I use just as much, if not more frequently, is my CollapseAllItems() macro: Public Sub CollapseAllItems() Dim solutionExplorer As Window = _...

Visual Studio Macros for Unloading/Reloading Projects

As promised in a post last week, here are the macros that I use to quickly unload or reload dozens of projects in a large Visual Studio solution. Hmmm, perhaps effortlessly is a better word choice -- considering I might need to wait 30 seconds or so for...

Tracing and Logging from Visual Studio Macros

As I mentioned in a post last week, I often use macros in Visual Studio to automate development tasks. Before sharing some of my most frequently used macros, however, I wanted to first introduce the method I use to trace events and log messages while...

Large Visual Studio Solutions and Loading/Unloading Projects

As I noted in my previous post , I typically work with "large" Visual Studio solutions. Note that I put this in quotes, because the definition of "large" will likely vary widely based on your individual experience. Note that I'm not referring to "large...

Bug: Visual Studio 2008 Code Metrics and Referenced Assemblies

Since I seem to be on a roll this morning with blogging, I figured I might as well get one more post in before moving on to my "day job." During the process of authoring a different post earlier today, I stumbled across a bug while using the Code Metrics...

Branching Strategy in Team Foundation Server

While attending TechReady (an internal Microsoft training conference) last week, I learned a lot -- not only about future versions of our products, but also numerous tips and tricks for current versions. One of the most valuable insights I gained was...

Fessing Up About Firefox

My name is Jeremy, and I'm a Firefox user. There, I've said it. I know, I know...what am I thinking, a Microsoft employee telling the world that Internet Explorer isn't the end all, be all browser for everyone?! Well, first let me clarify a little...

Visual Studio Team System 2010 Week on Channel 9!

Visual Studio just keeps getting better and better! Check out the 20 new videos that will be released over the course of this week announcing the most exciting new features in Visual Studio 2010. The Technical Evanglelists (boy, isn't that a dream...

Fiddler + WPAD - VPN = SlowPerformance

I needed to look at some low-level HTTP traffic this morning, so I fired up Fiddler -- my tool of choice for this kind of thing. Unfortunately, I found that as soon as I enabled Fiddler, my browsing experience slowed to a crawl. Page requests that previously...

A Better Way to Build SharePoint Solution Packages (and CAB Files)

Up until about an hour ago, I'd been using post-build events on my Visual Studio projects to create SharePoint solution packages (WSPs). However, while this worked reasonably well, this method always bothered me a little because the post-build events...

Memory Leak in SPLimitedWebPartManager (a.k.a. IDisposables Containing IDisposables)

Back in February, Roger Lamb kicked off his MSDN blog with a great post ( SharePoint 2007 and WSS 3.0 Dispose Patterns by Example ). It provides numerous code samples that demonstrate memory leaks commonly produced when working with the SharePoint object...

"TFS Lite" for WSS v3

In my previous post , I introduced my "TFS Lite" SharePoint site template that I've been using for years as a simple scenario/task/bug/risk/milestone tracking "application" with various projects and customers. In today's post, I'll discuss some of the...

"TFS Lite" for WSS v2

[Update (2008-04-07): "TFS Lite" for WSS v3 is now available.] For almost as long as I can remember (okay, not really that long -- but at least as far back as 2003), I've been using SharePoint lists as a bug tracking tool on almost all of the customer...

Installing Visual Studio 2005 Service Pack 1

Stepping into the "Wayback Machine" for a moment, I realized that I hinted about a problem with installing Visual Studio 2005 SP1 , but I never got around to blogging about it in more detail. Unfortunately, I just got bit by this problem yet again this...

Save HUGE Amounts of Disk Space by Slipstreaming Service Packs

This is a little embarrassing, but I captured numerous screenshots back in April while rebuilding my SharePoint development VM, but I never got around to writing a blog post to actually share this information with anyone. Well, it's long overdue, but...

Structuring Visual Studio Solutions

Over the years, I have refined how I create Visual Studio projects based on lessons learned and new capabilities provided with each subsequent release of Visual Studio. When starting a new project from scratch, I start by creating a blank Visual Studio...

Testing for Expected Exceptions with Visual Studio

Since I seem to be on a roll blogging this morning, I thought I'd see if I could get one more in before my baby girl wakes up to have breakfast with "Da-da." When transitioning a couple of years ago from using NUnit to Visual Studio 2005, I noticed...