Migrated to Azure Web Sites 2

I’ve been thinking about moving this blog over to Windows Azure for a while, but I’ve finally got around to it, and it has to be said the experience was pretty simple. Previously I’d experimented with Windows Azure Cloud Services, specifically packaging it up as a web role. However, this blog is powered by WordPress, which is PHP and MySql based, so this wasn’t the simplest process in the world, and left quite a lot to be desired when it came to enabling and using all the WordPress features, like being able to use plugins without having to repackage the web role. But then Windows Azure Web Sites comes along, and migrating was simple. In case anyone else is looking to do the same, here’s the steps I followed: Backed up all the files from my blog at my existing hosting provider (in this case copied everything locally via FTP) ...

Current WordPress Plugins

Seeing as a certain member of the team expressed an interest (you know who you are @Plip!), I thought it worth sharing the current set of plugins I have installed on this WordPress blog. Yes, I know, I could be opening up this blog to all sorts of attacks, but I’d prefer to help others than get all paranoid about security. If I get attacked, I’m sure it’ll be the subject of a future blog post! AddThis Social Bookmarking Widget Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content–which services they’re using for sharing, which content is shared the most, and more. It’s all free–even the pretty charts and graphs. Version 2.2.1 | By The AddThis Team | Visit plugin site ...

Auto-generating XML serialization classes – NuGet Edition 2

A while back I posted about automatically generating the XML serialization classes from schemas referenced in BizTalk or other projects. This was a relatively simple T4 template that essentially does the same job as the XML Schema Definition tool (XSD.exe). Since then I’ve also been really enjoying NuGet. If you’ve not heard about NuGet then I suggest heading over to the NuGet project on Codeplex, where there’s a good overview in the documentation. Well, to cut a long story short, I’ve packaged up the T4 template into a NuGet package, XsdClassGen, and published it in the main NuGet feed. So now it’s really simple to add to your projects. Enjoy!

101 LINQ Samples 2

OK, I’ve just discovered this. If, like me, you’re always struggling to remember the name of that LINQ extension method, or precisely how it’s supposed to work, then this is really useful. http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx Every single LINQ extension method, categorized, and all on one page without all the method overload signatures that just end up confusing you. Then, once you’ve identified the one you need a single click will take you to a concise yet precise example of how to use it, and what result you can expect. Simply brilliant! I’ve no idea who did this, but thank you.

Exposing Squeezebox Web UI on Windows Home Server

At home I use a number of Logitech Squeezebox Receivers and a Squeezebox Controller to listen to and distribute my digital music around the house. All the actual music is stored on my Windows Home Server, which also runs the Squeezebox Server software. The trouble is the web UI for the Squeezebox Server runs under its own web server, not integrated with the Home Server’s web UI. This means I have to use a nasty looking URL (like http://machinename:9000) to access the UI, which isn’t hugely memorable, and it’s also not easily available remotely from the internet. What I’d like to have is this UI available under the usual Home Server remote URL, something like http://yourname.homeserver.com/squeezebox/. Enter ISAPI_Rewrite from HeliconTech. Essentially this is an IIS ISAPI filter that implements the same functionality that you get in Apache mod_rewrite to rewrite IIS request URLs. If I were running IIS7 or above ...

Auto-generating XML serialization classes from BizTalk schemas 1

UPDATE: (18th February 2011) I’ve now packaged this template as a NuGet package. Read more about it here. UPDATE: (4th October 2010) A customer of mine has just pointed out that there was a bug in the template, so I’ve updated it. Thanks Sébastien for spotting this one! The bug was caused by the template generating partial serialization classes for all the root elements defined in each schema. However, if these root elements also included simple types, like enumerations, these aren’t generated as partial classes by the XML serializer, and so you get a compile error indicating two type definitions with the same name. The fix was to ensure that the template only generates partial serialization classes for root elements that are complex types. When building BizTalk applications you often need to generate the XML serialization classes for your schemas. Sometimes this is a more efficient and simple way gain ...

Subversion and Windows Search

I’m a regular Subversion user, specifically TortoiseSVN and VisualSVN, but I’m also a big fan of Windows Search, particularly with all the improvements introduced in Windows 7. However, when Windows Search indexes areas of the file system where you’ve checked out a Subversion repository to, then by default it will index the checked out files and the base files that Subversion keeps in the hidden .svn directories. In addition it indexes all the other files in the .svn directories. This means you can get a slightly odd search experience as you often get garbage in the results and two hits for every matching file, one that’s the file you’re looking for and one that’s the base file in the .svn directory. So, what’s the solution? Well one solution is to slightly alter the query you use when searching directory hierarchies that contain Subversion managed files. Just add -folder:.svn to the ...

Migrated to WordPress

Well, I finally got fed up with Graffiti, it’s lack of features and pace of development, so I’ve switched to WordPress. So far, I’m quite impressed. The migration was a bit of a pain, but I got there in the end! Hopefully a new blog platform will re-energise my writing and I’ll get some more interesting posts up here.

.NET Naming Conventions – VB.NET version

Not so long ago a colleague of mine, Josh Twist, did a post on .NET naming conventions using C# code to serve as an example. These are based on the .NET naming guidelines published on MSDN. Well, I happen to be doing a code review right now, but it’s in VB.NET. So I thought I’d do a VB.NET version and post it here for everyone’s reference. I’m sure that Eric Nelson will be very happy! Option Explicit On Option Strict On Imports System ' Namespaces are PascalCased Namespace Example.NamingConventions ' Class names are PascalCased Public Class ExampleClass ' All public fields, including constants are PascalCased Public Const PiAsAString As String = "3.14" ' All private fields are camelCased with an underscore prefix Private ReadOnly _privateMember As String ' All protected members are PascalCased Protected ProtectedField As Integer = 12 ' All friend members are PascalCased Friend InternalField As Integer = ...

BizTalk WCF Adapter Stack

For a while now I’ve been thinking about writing a post that documents all the gritty details of how the BizTalk messaging engine hooks into the WCF stack in the various WCF adapters. Now I don’t have to as Paolo Salvatori has done a stunning job: http://blogs.msdn.com/paolos/archive/2009/11/17/customizing-and-extending-the-biztalk-wcf-adapters.aspx Well done mate. This is by far the best explanation of how the BizTalk WCF adapter stack actually works. It should be in the documentation!