Mastodon

Removing superfluous HTTP headers in ASP.Net

When creating a new ASP.Net MVC project, by default you will end up with a number of extra HTTP headers in your responses which can safely be removed.

Default nuget.config file for new projects

When starting a new .Net project, I like to place a nuget.config in the solution root folder with a number of default settings in place. This is to ensure a number of good behaviours for NuGet.

Easier Castle Windsor WCF Registration

Castle Windsor has a great add on called the WCF Integration Facility which allows you to get all of the benefits of DI/IoC when working with WCF services.

Unit testing appSettings from web.config

You can call the set method of ConfigurationManager.AppSettings to set the values required for that particular unit test.

NVelocity is dead

The Castle Project forked the project and have been maintaining it, and most recently released version 1.1.1 on 10 December 2010. More details can be found at the Castle Projects NVelocity site. They have also made a number of improvements to it, details of which can be found on their NVelocity improvements page. The project looks like it is now dead and in MonoRail 3, it has been replaced by Castle Blade which is based off Razor.

MySql Delete From Table vs Truncate

Delete from table deletes each row from the one at a time and adds a record into the transaction log so that the operation can be rolled back. The time taken to delete is also proportional to the number of indexes on the table, and if there are any foreign key constraints (for innodb).