Archive for the ‘Code and Computers’ Category

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) 

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.


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

So far has been working reasonably well.

Example below:


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:


The future of HTML is bleak.

Is the replacement already here? Well maybe, just bare with me for a while.

Basically instead of sending html code, send back the picture. Sound familiar that’s cause it is. It is basically just Remote Desktop but only for applications with internet optimized features (like streams).

Whats needed:
Almost identical to the current Remote Desktop idea so reuse what can be.
Support of direct streams. One obvious streams are direct video/sound, file download/uploading.
Clients to support the view plugin (there is already a skew of remote desktop apps)
Server to efficiently compress streams and images.
Server should be able to function with application, video level could pick up the intercepts, same as remote desktop.



So I spend a lot of time with NServicebus and one thing I have come to recognise is that it is a configuration nightmare. Actually truth be told I no longer like dealing with NServicebus simply because during each month that passes I need to learn another way to configure something that was already configured.

Case and point.
Start NServiceBus and greated with
”  Additional information: NServiceBus performance counter for Critical Time is not set up correctly. “



Content:hello world


This has been buggin me for ages. In Windows Xp you could search for a text string in files within a directory. 

aka if we have a text file “myTe.txt” and in that we have a string “hello world” then searching in windows 7 for hello world will return no results, in xp it would return  “myTe.txt”

In Windows 7 to do this you need the keyword “Content:” so 

Content:hello world

will return “myTe.txt”