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.

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.

Monday, 25 July 2016

The future of mobile (sort of)

Forget Straight Through Processing, Integration Hub and all that stuff. Yesterday I experienced the future of digital (mobile) computing: Pokemon Go!

After a 3 hour drive home I was confronted by two kids in my living room hassling me to download Pokemon Go “because all our friends have it”. So reluctantly I did, and consoled myself at least it might get them out of the house, away from their tablets and walking a bit.
And so out we went. We had to walk to our local train station where there was a “Pokemon Gym” and then to our church because we could throw some Pokemon balls at a Pokemon, capture him and then “hatch his eggs”. (I’m sure I’m getting this all wrong).

But the thing that struck me was once you’ve done it, you suddenly become aware that everybody else who is walking along the streets in a particular pose; head down, looking at their mobile – is in fact playing Pokemon Go. I counted at least 4 separate groups of people in the church yard trying to capture that elusive Pokemon. Apparently a 40 year old parent I know is the local Pokemon champion. Sad.

It’s quite a fad. Yesterday my son told me that it was on TV that some children had to be rescued by the fire service because they were stuck up a tree searching for a Pokemon.

On the technical side; it really is a good mix of GPS services, augmented reality and networked gameplay. I don’t recommend you try it! (I’m secretly a little bit gutted I had the idea of networked GPS gameplay several years ago but did nothing about it).

The world is evolving. What seems odd today (middle-aged people walking around playing games in the street) suddenly becomes the norm.

But what's the relevance to work? Here in Financial Services we're OK right? We live in a regulated environment with a high barrier to market entry, don't we?

Well, not so fast. In the UK Tandem Bank​ is launching: the second mobile only company to be granted a full UK banking license. (I'm buying some of their shares when they IPO).

Revolut has, er, revolutionised my trips abroad. Interbank foreign exchange rates, even currency trading if you're so inclined. Charge-free cash withdrawals abroad. And immediate feedback to your phone when you make that purchase abroad. I can't see that [wo]man in the currency booth at the airport lasting much longer, nor the excessive fees charged by the banks.

Also we have peer insurance with sites like Guevara.

Suddenly paper-based applications and telephone calls to change addresses feels a little, well, old.

Tech is amongst us. We need to embrace it in our professional lives, or suddenly find ourselves out in the cold. After all, the London Black Cabs was a regulated, closed market with a high barrier to entry. And then along came Uber....​

Friday, 15 July 2016

Android Folders

Default Android drawable folder:

\path-to-your-android-sdk-folder\platforms\android-xx\data\res

Tuesday, 5 July 2016

Android Studio Tips - Making it behave like Visual Studio

If you are a Visual Studio developer then sometimes you will want Android Studio to behave similarly. Here is a list of tips for configuring Android Studio


Highlight the selected tab

You can configure Visual Studio so that the project view always highlights file in the currently selected tab. Fortunately Android Studio supports this too. Click on the settings icon and then select "Auto scroll from source".


List the class members

Unfortunately there is no dropdown list which lists the class's members like in Visual Studio. However CTRL+F12 will bring up a dialog which will.


Thursday, 30 June 2016

Android Async Processing

This great article documents some of the ways in which you can do asynchronous processing on Android.