NHibernate Software Engineering

web.config transformations for NHibernate

If you’re trying to use web.config transformations in VS 2010 with nHibernate you might be hitting the same issue I’ve been getting the transformation to match the hibernate-configuration node. The reason is because you have to specify an xmlns="urn:nhibernate-configuration-2.2" attribute as part of the configuration:

<configuration> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="connection.connection_string">connection string</property> ... </session-factory> </hibernate-configuration> </configuration>

To fix, just set … Read more “web.config transformations for NHibernate”

PHP Software Engineering

Running OpenX under IIS with PHP 5.3 – date_default_timezone_get errors

I run OpenX (an open source ad serving platform) under IIS and PHP …. but after upgrading to PHP 5.3 noticed the following error appearing in the PHP error logs file (c:\windows\temp\php-errors.log by default).

PHP Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. … Read more “Running OpenX under IIS with PHP 5.3 – date_default_timezone_get errors”


PHP 5.3 and IIS 7 – beware of MySQL issues with IPv6

I’ll keep this short and sweet as it’s covered in depth elsewhere. After installing PHP 5.3 suddenly my website stopped working – but instead of throwing errors, it simply sat there and eventually timed out (with no error). Turns out there are issues with both PHP and MySQL around IPv6. The most common solution is “turn off IPv6 support” – … Read more “PHP 5.3 and IIS 7 – beware of MySQL issues with IPv6”

ASP.NET Web Development

Beware: Upgrade to ASP.NET MVC 2.0 with care if you use AntiForgeryToken

If you’re thinking of upgrading to MVC 2.0, and you take advantage of the AntiForgeryToken support then be careful – you can easily kick out all active visitors after the upgrade until they restart their browser. Why’s this? For the anti forgery validation to take place, ASP.NET MVC uses a session cookie called “__RequestVerificationToken_Lw__”.

This gets checked for and de-serialized … Read more “Beware: Upgrade to ASP.NET MVC 2.0 with care if you use AntiForgeryToken”

ASP.NET Web Development

Including Spark views in VS 2010 web deployments

Visual Studio 2010 includes much improved deployment tools – but by default it only includes files “needed to run this application”. If you’re using the Spark view engine for ASP.NET MVC, then the Spark views aren’t considered one of them!

The trick is to ensure your .spark views have a build action of “Content” instead of the default “None”. Clearly … Read more “Including Spark views in VS 2010 web deployments”

Software Engineering Startups and Business

developerFusion community relaunches

As some of you will know, I’ve run the developerFusion community for many years now, as a part-time hobby. Now, some big changes are afoot! 2 months ago I packed in my day job to focus on the site full-time, and have now made the first big step and re-launched the site.

You can check it out at

This … Read more “developerFusion community relaunches”

ASP.NET IIS Software Engineering

UrlRewriting, .NET 2.0 SP1 and Search Engines

Having been caught out by this issue once again this weekend, I thought I’d better blog about it so I don’t scratch my head searching around again for a third time!

If you’ve been getting some wierd “Cannot use a leading .. to exit above the top directory.” exceptions occuring on your site (you *do* log those, don’t you?), that … Read more “UrlRewriting, .NET 2.0 SP1 and Search Engines”

ASP.NET Software Engineering

MasterPages, ViewState and web.config files

protected override void OnInit(EventArgs e)        {            // we use this so that we can set the enableViewState property in the web.config            // although it sets it at the page level, it doesn’t pass it on to the master page            this.EnableViewState = this.Page.EnableViewState;            base.OnInit(e);        }

Developer Community

Get your tech events featured on MSDN UK and TechNet UK!

This announcement is well overdue, but better late than never!

After much hard work by the DPE team at Microsoft in the UK – thanks in particular go out to Clare – we’ve now integrated the Developer Fusion events feed with the Microsoft UK community pages. This means that anyone who submits a Microsoft technology-related event to Developer Fusion will also automatically … Read more “Get your tech events featured on MSDN UK and TechNet UK!”

C# Software Engineering

Gotcha: “The specified metadata path is not valid.” with ADO.NET Entities on Vista x64

For those of you foolhardy enough to be running Vista x64 (myself included!), VS 2008, and the latest build of the ADO.NET Entities framework… you may well hit the following error message:

The specified metadata path is not valid. A valid path must be either an existing directory, an existing file with extension ‘.csdl’, ‘.ssdl’, or ‘.msl’, or a URI that … Read more “Gotcha: “The specified metadata path is not valid.” with ADO.NET Entities on Vista x64”

General Computing

Shared Printers across Windows Vista and Windows XP

Since getting a shiny new machine running Vista, I’d been having a bit of grief trying to get it to print to my Canon i6500 printer shared through another Windows XP machine. Vista has built-in support for the printer (running locally), but when trying to add it across a network, as the XP machine could not supply the correct 64bit Vista drivers, … Read more “Shared Printers across Windows Vista and Windows XP”

Developer Community

Upcoming (Free) UK Developer Events

There’s so many great events coming up all around the UK at the moment – and best of all, they’re free. If you haven’t tried one yet, check out the UK developer event listings to find one near you. Here are just a few

db4o: An Embeddable Database Engine for Object-Oriented Environments

Wednesday, 10 October 2007, 19:00 – 21:00 in
Read more “Upcoming (Free) UK Developer Events”