Chris Roberts

Blog

Welcome to my blog.

About

Posts from August 2009

Automatically Adding SVN Revision Numbers to Assemblies

Source code version control is one thing that no developer should ever live without. If you're working on some code that isn't in a version control system, stop what you're doing now and get yourself one!

There's no excuse - there are plenty of free ones available that are simple to install and use. My personal favourite is Subversion (SVN). The particular flavour I use is VisualSVN which has a simple server configuration system and a convenient Visual Studio plugin. If you're really new to version control, you could do a lot worse than to read the SVN book, too.

Visual Studio with Roaming Profiles

I have been having a problem with Visual Studio constantly reconfiguring itself on startup. Quite often, when launching the environment, I get this message...

"Microsoft Visual Studio is configuring the environment for first time use. This might take a few minutes."

ASP.NET MVC. Like ASP.NET, but without the Voodoo!

Much has been written about Microsoft's new Model-View-Controller (MVC) framework for ASP.NET. The initial reaction of many developers - me included - is that Microsoft are driving us back to the bad old days of 'tag soup'; Server side code sits nestled amongst the HTML just like the traditional ASP pages we were all so glad to move away from.

When you delve a little deeper though, and learn more about the MVC pattern it really starts to make sense. Most of the code you'll write will be in the Controller classes, completely separate from your HTML. Yes, there is a little server side code in the HTML (the View), but if done properly this can really be kept to a minimum.

Don't give up on the Written Word

I'm always interested to watch how new technologies and media are adopted by the Internet as a whole. The web has quickly progressed from pages of plain text to include support for images, various formats of audio file, video clips and even 3D worlds (remember VRML?).

As the availability of bandwidth has been increasing at an outstanding rate, so has the availability of video on the web. Website providers are practically falling over themselves to pour video content down the throats of their visitors. As I type this post I am catching up on some missed TV programmes courtesy of the BBC iPlayer.

Automatically switching to SSL in ASP.NET

At first, it seems like quite a simple requirement - to automatically transfer a visitor to an SSL connection when they visit a certain area of our site (everything in the 'secure' folder in our case), and to transfer them back to a plain old HTTP connection when they leave.

Our initial implementation of this was a simple HTTP Module. This intercepted incoming HTTP requests for the '/secure/' folder and redirected the user to an HTTPS version of the same page. Conversely, if an HTTPS request comes in for a page which isn't in the '/secure/' folder, a redirect is issued to the HTTP version.