Enumerating HttpModules: MVC Edition

August 13, 2014

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.

Here is the relevant code:

Continue reading...

CSC : warning CS1685: The predefined type ‘System.Runtime.CompilerServices.ExtensionAttribute’ is defined in multiple assemblies in the global alias

May 9, 2014

In one of my ASP.NET MVC 5 projects that targets .NET 4.5.1, I noticed that I was getting a new compiler warning at build time:

CSC : warning CS1685: The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias

Continue reading...

Using EFProf and MiniProfiler simultaneously in an ASP.NET MVC 5.1, Entity Framework 5 Code-First Project

January 23, 2014

We’re already using the excellent Entity Framework Profiler (EFProf) to gauge EF performance in our application. However, we wanted more information about the overall application performance, and thus turned to MiniProfiler.

Continue reading...

On worrying

September 25, 2013

Rob Ashton, with a fine philosophy on worrying:

Continue reading...

Unable to start debugging on the web server

September 18, 2010

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.

Continue reading...

ImageCodecInfo: Encoder and Decoder information

January 25, 2010

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:

Continue reading...

Free ZIP Code Database (data provided by PopularData.com)

November 21, 2009

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.

Continue reading...

"HTTP Error 401.1 - Unauthorized" when using Windows Authentication on IIS7.5

September 21, 2009

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.

Continue reading...

GraffitiCMS 1.2 export utility

August 29, 2009
Update 2010-09-29: This code has been moved to BitBucket: http://bitbucket.org/jonsagara/graffititoblogml

Continue reading...

Ordered a new computer

November 19, 2008

But it can’t get here soon enough.

Continue reading...