February 1008

Machine.config changes for Production

All .NET websites inherit their settings from other .config files that exist ‘lower’ down the chain; so a web.config in the root of the wwwroot folder can contain settings that apply to all websites on that server. However going lower still is the machine.config and settings made here apply to the machine generally. Here I am going to make some changes to the machine.config to harden the production server and give a slight boost to performance. [More]

February 1008

Preselecting an option in RadioGroupLists

Another quick helper method to preselect a value from any radio group list control on the page. [More]

January 1028

Casting an enum to another enum

I thought I’d share a little method I needed to create yesterday that casts one enum to another. The logic is easily adaptable to allow other types of casting... [More]

January 1026

Validation of viewstate MAC failed

We have just added a second Windows 2008 Web Server to our production environment and hit our first problem “Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.” [More]

January 1026

The trouble with Enums

Why are enums so hard to work with? For simple / trivial things, where you want to limit the options available to other developers an enum is a wonderful thing, such as a choice of colours or display modes. [More]