The problem arises when you have a column with character strings that look like numbers. Looking like a number isn’t a problem in and of itself, unless the value starts with the character “0”. Excel will try to treat the column’s values as a number, and therefore eliminate any leading 0s.

About 6 years ago, I wrote a post about Enumerating HttpModules in ASP.NET. On my current project, I once again needed to view the loaded HttpModules, but this time in ASP.NET MVC. The code is very similar; it just has some MVC-isms and has been LINQ-ified now.

If you’re getting this error when trying to debug an ASP.NET Web application on IIS7 or greater, check the system.webServer element in your Web.config. If you have the httpErrors element configured, you won’t be able to debug. For your local dev environment, remove or comment out the httpErrors element, and you should be good to go.

If you’ve ever been curious about the GDI+ encoders and decoders available on your system, you can call ImageCodecInfo.GetImageEncoders() and ImageCodecInfo.GetImageDecoders(), respectively, to find out more:

PopularData.com provides a free list of U.S. ZIP codes in CSV format on their Web site. I have taken the liberty of using that data to generate a SQL script that will create a [ZipCode] table in your SQL Server 2005 database and populate it with over 42k unique U.S. ZIP codes. Schema details can be found on this page.

You may have run into this error while trying to develop a site that uses Integrated Windows Authentication on Windows Server 2008 R2 with IIS7.5. I sure did, and I beat my head against the wall for a couple of hours trying to figure it out.

One common ASP.NET performance tip is to remove any HttpModules that your application does not use. You can take a peek at which modules are loaded by the framework on your behalf by examining the framework’s Web.config file, but how do you find out which modules are actually loaded in the current context?

A couple of months ago, I ran into a problem where I was seeing a bunch of ThreadAbortExceptions showing up in my logs. It didn’t take long to track down why – I was calling Response.Redirect from within a try/catch block in my ASP.NET code-behind page, and the catch block was catching the ThreadAbortException and writing it out to the log. But why was the ThreadAbortException being generated?