Author Archives: Phil Munro

About Phil Munro

I have been developing commercial desktop and distributed web applications with Microsoft technologies since 1997.

VS2012 ‘Cannot launch debugger’ error when trying to debug tests

If you’re using Visual Studio 2012 with ReSharper on a 64-bit version of Windows and get these messages when trying to debug a test, this is a known issue with Microsoft VS2012  and not ReSharper (so don’t go blaming the … Continue reading

Posted in ReSharper, TDD, VS2012

WCF error-handling strategies (part 2): Throwing specific fault exceptions

(See WCF error-handling strategies part 1 here) Deciding on the right error-handling strategy for your WCF services and clients can be tricky. But if you’re not 100% clear on exactly what strategy you are using and how it will behave … Continue reading

Posted in C#, WCF

Automatic page element focus in MVC

It’s really annoying when a web page doesn’t have focus set to an element on the page by default. Especially for things you visit regularly like login pages. It shows no effort went into the design or UX.  So here’s … Continue reading

Posted in ASP.NET MVC, Javascript, jQuery

WCF error-handling strategies (part 1): IServiceBehavior and IErrorHandler

Probably the biggest of all cross-cutting concerns is error-handling and logging. Unfortunately, WCF doesn’t seem to have a silver bullet for capturing, logging and suppressing exceptions thrown in the service layer. Ignoring Windsor interceptors for the moment (which deserve a … Continue reading

Posted in C#, WCF

How to avoid changing your WCF service contracts

WCF service contracts are like legal contracts. Once released, they are set in stone and should never be broken. If there are client applications which consume your service and you decide to change one of the operation signatures on the … Continue reading

Posted in Architecture, C#, WCF

Creating a WCF service proxy with ChannelFactory<T>

Before going into the details of using ChannelFactory, if you are not familiar with service proxies (or have used them but don’t understand why they’re important) here’s a little bit of background. When a client application makes a call to … Continue reading

Posted in Architecture, C#, Multi-threading, WCF

Resolving data contracts shared between multiple WCF services with SvcUtil

If you’re using the SvcUtil.exe tool to generate proxies for WCF services, before long you may hit a problem where the same data contract shared between two services results in a compiler error at the client. You could just specify … Continue reading

Posted in WCF