Got really bored looking this up every time

In startup.cs add the following

config.Services.Replace(typeof(IExceptionHandler), new MyExceptionHandler());
public class MyExceptionHandler : ExceptionHandler 
    public override void Handle(ExceptionHandlerContext context) 

A simple post today:

In Windows 10 when your laptop goes into power saving mode then the screen will auto dim. On my laptop this rendered the screen too dark and attempts to brighten the screen were overridden by the service auto dimming it again.

Eventually I found how to disable this in Windows 10.

The check box is rather hidden but can be found under… Read the rest of this entry »

Upon installing Windows 10 preview 10310 I was unable to connect via remote desktop, even though I had enabled “Allow remote connection to this computer” and I was on the same network (10.0.0.X) and same work group “WORKGROUP”.

First check you have actually allowed remote connections, do this by then using the windows 10 search function on the computer you want to connect to and enter “allow remote connections”, click on the found link.
Check that the radio button is selected for “Allow remote connection to this computer”, select this if it isn’t already selected.

allow remote connections to this computer

allow remote connections to this computer

Read the rest of this entry »

Sometimes you just want to store stuff and not use it for traditional relation searches.

Ideally a NoSql solution would fit well in this scenario but don’t rule out Sql for a hybrid style solution.

You just have to be aware of certain limitations but otherwise the results are extremely pleasing.

Read the rest of this entry »

A quick guide on how to populated “Description No documentation available.” in Microsoft Web Api Help Pages

Microsoft’s Web Api Help Pages is a nice surprise when it comes to something as tedious as documentation. Unfortunately it requires a small configuration to get the most out of it. This guide is a rapido guide for getting the “Description No documentation available”.

In the example I use the stock WebApplication1 generated by Visual Studio when you select a new WebApi Project.

0) Create a new ASP.NEt project and select Web API. This will create a new project with the Nuget package “Microsoft ASP:NET Web Api 2.x Help Pages”.


1) Build and run your new project and navigate to the auto generated documentation.
Read the rest of this entry »

To get the identity from the insert when using dapper return the SCOPE_IDENTITY

So far has been working reasonably well.

Example below:

Read the rest of this entry »

NServiceBus, not my love affair

Posted: 2015-02-25 in .Net

I’ve been using NServiceBus for more than 3 years now.

In principle, NServiceBus is excellent. Saga’s are a huge time saver, as is guaranteed delivery and the piece of mind they provide.
My irk with NServiceBus is that it is simply more trouble than worth.

Random Reasons:

Read the rest of this entry »