How can I properly handle 404 in ASP.NET MVC?

I am using RC2 Using URL Routing: routes.MapRoute( “Error”, “{*url}”, new { controller = “Errors”, action = “NotFound” } // 404s ); The above seems to take care of requests like this (assuming default route tables setup by initial MVC project): “/blah/blah/blah/blah” Overriding HandleUnknownAction() in the controller itself: // 404s – handle here (bad action … Read more

How to fix: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

I am configuring an MVC 3 project to work on a local install of IIS and came across the following 500 error: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list. It turns out that this is because ASP.Net was not completely installed with IIS even though I checked that box in the … Read more

Visual Studio debugging/loading very slow

I’m at wit’s end. Visual Studio is typically painfully slow to debug or just plain load (“start without debugging”) my ASP.NET MVC sites. Not always: at first, the projects will load nice and fast, but once they load slow, they’ll always load slowly after that. I could be waiting 1-2 minutes or more. My setup: … Read more

How to get ELMAH to work with ASP.NET MVC [HandleError] attribute?

I am trying to use ELMAH to log errors in my ASP.NET MVC application, however when I use the [HandleError] attribute on my controllers ELMAH doesn’t log any errors when they occur. As I am guessing its because ELMAH only logs unhandled errors and the [HandleError] attribute is handling the error so thus no need … Read more