Tuesday, 16 August 2016

MVC routing fails and IIS 7.5 returns 404 with StaticFile handler

I had a new build Windows 7 machine with IIS7.5 and encountered an old problem again.
An MVC Web API application I had installed was failing to run and IIS was returning 404 and was indicating that the StaticFile handler was being executed:


The handlers were configured correctly in the web.config:

Running aspnet_regiis -i against the correct .NET version didn't do anything.
People recommend that you don't add the <modules runAllManagedModulesForAllRequests="true"> element to the web.config, so I didn't. What was going wrong?

In the end I found my own blog post! The problem was that the ISAPI filters were disabled by default.
The problem was solved by turning them on.

Friday, 12 August 2016

Tracing complex code in Visual Studio

The following tools are available if you want to trace who is calling a method in complex code:

CodeLens - only available in VS2013 Ultimate or 2015 Enterprise, this will show the references to a class, method or property.

Or the View Call Hierarchy context menu.

Or the Resharper -> Inspect -> Incoming Calls.

Tracing complex code in Visual Studio

The following tools are available if you want to trace who is calling a method in complex code:

CodeLens - only available in VS2013 Ultimate or 2015 Enterprise, this will show the references to a class, method or property.

Or the View Call Hierarchy context menu.

Or the Resharper -> Inspect -> Incoming Calls.

Tuesday, 9 August 2016

Certificate Thumbprint in MMC

The certificate thumbprint in .NET code is equivalent to the the SHA1 Hash in the MMC certificates snap-in.

Certificate Thumbprint in MMC

The certificate thumbprint in .NET code is equivalent to the the SHA1 Hash in the MMC certificates snap-in.