# Wednesday, August 22, 2007

Stacey bought me a Canon IXUS 950 IS for my birthday which needless to say I was more than chuffed to receive, it's a fantastic camera with enough bells and whistles to make it more than just a happy snappy camera but not too many to make it cumbersome to transport so you can ensure you have it to hand when that un-missable shot is coming.

Problem was, on the weekend it developed a fault -Canon's dreaded E24 error. It's predecessor lasted about 4 years before a rainstorm when it decided to start (understandably) complaining for a while but the IXUS 950 IS hasn't had any (recent)1 abuse so I called Amazon fearing the worst but hoping they would replace it as this would appear to be a software related fault.

1 About a week after I got the camera I did drop it but that was mid July.

I first of all emailed them using their online panel as it was out of it's 30 day no-quibble return period but didn't get a response. A little inpatient I decided to call them yesterday and I spoke to a very helpful representative named "Donncha" who assured me that despite my mishap with dropping it there should be no issues in returning it no offence Donncha but I've heard that one before so I didn't hold my breath. He told me a courier would come and collect the camera tomorrow (today) and a replacement would be with me in 3-4 days.

A little later I received -what I assumed was- a collection email saying Royal Mail would be around at some point, I wasn't expecting what happened next. At approximately 10am our usual Royal Mail parcel guy arrived to collect the camera, then, about 5minutes later, another parcel delivery man arrives and drops off the replacement!

I have to take my hat off to you Amazon in this instance, that's superb customer service!

Wednesday, August 22, 2007 9:53:08 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Text.StringBuilder.FormatError()
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
Error Line

Just got that message (or at most "Exception of type 'System.Web.HttpUnhandledException' was thrown")? Puzzled? I was the first time I got it, I've been meaning to post about it for quite some time now so seeing as I got it again today I took the hint.

The error is horrifingly obvious when you know about it, in short, you've no doubt got some code that looks like this:

String.Format("<html><head><style type=\"text/css\">body{color: #fff;}</style><body>...");

Can you spot it now? Notice your style declaration is using the curly brackets? Basically String.Format is interpreting that as a placeholder i.e. {0} and is throwing a wobbly.

The solution is simple too, just replace all opening/closing brackets with two i.e:

String.Format("<html><head><style type=\"text/css\">body{{color: #fff;}}</style><body>...");

I hope that helps someone out there :)

P.S. Watch out for methods that use String.Format as they may catch you out in the same way -i.e. Subject of System.Net.Mail.MailMessage

Wednesday, August 22, 2007 9:43:12 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [6]  | 
# Sunday, August 19, 2007

We've officially been using Chip and Pin in all stores since around February 2007 in the UK which has made life a lot easier in many ways but ever since it's introduction, I for one have had concerns over the claims that it's safer. I agree that it is (or was) harder to find out someone's pin number but has it made shop assistants more complacent?

Stacey and I have a joint Egg Card -I know, what WAS I thinking ;), anyway, these two cards look identical and even had the same pin number and as a result, we recently got them mixed up. I can't say for sure when it was we got them swapped around but one thing for sure is that it was a good couple of months ago. Ever since, we've both been using the wrong card without being questioned, at a guess, I think this has gone on for around 4 months and I only noticed the other day when I looked down and read the name on the card when I was paying online.

This for me is pretty concerning, ok it's because I know the pin, the shop assistant assumes I'm the card holder and doesn't check the name (which the used to when they were forced to check the signature -if they bothered checking that of course ;)).

I think it's also easier to find out the pin too as people aren't overly cautious about entering in their number, I've even seen an old lady in a wheelchair type her pin in on the terminal which was on the desk while she remained lower down in the wheelchair, allowing anyone within about 10m to read what she was typing in. She then promptly put her card back in to her bag and hung it over the back of her wheelchair -where any unscrupulous person could come along and "borrow" the card. It's not just the elderly however, even the young allow other people to read the pin.

I would be interested to know the statistics in crime reduction, I wonder if they're as high as the government were predicting or whether these predictions failed to include the main weak link in the system -us.

On the whole however, it has made life easier and I like Chip and Pin despite these (human) errors, to an extent I think it has made it harder for the criminal to steal (though before he had to learn the signature) but I think people need to be more cautious.

Sunday, August 19, 2007 10:59:43 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, August 16, 2007

"Charge less and just do it quicker" -or- "Charge less, just spend less time on it"

That's what I got from someone that (infrequently) passes me work when I quoted him on some development yesterday. It sums some clients up though, they think you can do the work required -and- get the results by doing less and as for working faster -you can forget that, do they not think we go as fast as possible so we can move onto the next project sooner?

Made me smile so I thought I'd share :)

Thursday, August 16, 2007 5:57:54 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, August 14, 2007

 What am I doing messing with OS Commerce I hear you cry? Well one of our SEO clients (Florame Organic Aromatherapy) uses a very hacked version of OS Commerce as it's engine and as dire as it is, if it ain't broke don't fix it.

Today I came across (another) error with one of the modules that was installed -the dreaded "1062 - Duplicate entry" error. After a little digging, it wasn't too hard to diagnose, unlike many people (see: 1062 - Duplicate entry fix) this error was being thrown in the product details page. It turns out that since installing the new Froogle feed, the UPC data wasn't being updated, the fix is for you to either remove it and create the UPC by combining i.e. the product code and model number on the fly or to simply validate the new UPC code field is populated.

Easy :) -I hope I saved you trawling through the OS Commerce forums.

Tuesday, August 14, 2007 11:14:15 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Wednesday, August 08, 2007

As with my previous post, we upgraded the AJAX framework on the weekend which broke a few things, but one control in particular that broke was our TextChangedTextBox which is based on Pete Kellner's timed postback control. Since updating we were receiving a "'debug' is undefined" error on line 1409 (which was in one of the JavaScript include files).

Having had this issue before I updated the TextChangedBehavior.js but that didn't sort it, I have the latest version of the Futures on the server too so I was lost. Turns out I had an old version of the AJAX Futures DLL within the Bin folder of the project.

So as with my post on the ASP.Net forums before -make sure you update your AJAX Futures when updating your Microsoft AJAX framework!

Wednesday, August 08, 2007 6:20:47 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, August 06, 2007

Over the weekend we had to upgrade the server's version of ASP.Net AJAX which went fine until this morning when we started receiving the error "Server cannot modify cookies after HTTP headers have been sent."

Luckily this wasn't bubbled up to the UI but incase other people are getting the error I thought I would share the fix. The error is apparently a known error with ASP.Net AJAX and the RolesManager. To fix the error all you need to do is add the following to your RolesManager web.config node:


The full error message was

Server cannot modify cookies after HTTP headers have been sent.

at System.Web.HttpCookieCollection.Add(HttpCookie cookie)
at System.Web.Security.RoleManagerModule.OnLeave(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Monday, August 06, 2007 1:52:08 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, July 28, 2007

My mum gave me a slightly odd Christmas present this year -a beer making weekend. I like many 20 something relished the opportunity to spend a weekend trying out a multitude of different beers, learning what goes into making one and more importantly how I can concoct my own sweet ale. Why then did I start this post saying it was somewhat of an odd present? Well mainly due to my training and much to Stacey's delight I'm virtually tea-total which means my beer-drinking experience thus far in life has been vastly limited to the odd drop of Kronenberg Blanc or Corona (my two current favorite beverage choices) and I can in no way call myself a beer connoisseur (or indeed want to call myself a beer connoisseur). Always wanting to try new things however I went to the beer making weekend with a clear and open mind.

We arrived at Nether Stowey Brewery after a fairly straight forward journey (god bless in-car sat nav systems -they really do take the pain out of navigating) a touch later than planned which meant the other attendees of the beer making weekend had already had the chance to get acquainted with our teacher for the weekend "Ian". I don't know too much about Ian other than he enjoys beer, works -as and when he likes (or so it would appear)- as a very successful employment lawyer and that he likes good beer (I know I've already mentioned that but he really did like his beer...).

The weekend started with a short lesson in beer making, some of the different techniques/flavours produced and a little background behind beer, for instance, did you know that beer was drunk as the primary drink until fairly recently as water was not safe to drink? Or that pale ale was produced by running water through the already used mulch? It was then given to the children as a much weaker beer? Or how about: Most beer and wine is not vegetarian as they use "finings" to remove the impurities (cloudyness) which are made from Fish Liver...

Followed was a discussion on both which drinks we tended to drink at home and what sort of beer we were all looking to produce. There were 5 of us in our group, obviously we were all going to have different opinions of what we wanted from "our" beer. Before we made our final decision we had the part that I think everyone was looking forward to the most -the beer tasting.

The idea behind the tasting was not to get drunk or simply down a load of different beers, we were taught how to taste (and so appreciate) each beer's qualities. It's amazing how different beers that you would assume were similar taste. The names of different beers was also intriguing. My favourite was the acclaimed "Titanic". Having won numerous awards I thought it was going to be a delightful drink, but lets just say the drink went down as well as the boat...

Ian and his most hospitable wife Lynne also run a B&B (The Old Cider House) so your accommodation over the weekend is in very pleasant surroundings -and the food to an excellent standard, we quickly relaxed. It turns out that Ian not only runs beer making weekends, he also produces a selection of fine ales for the local pubs -some of which go down a storm, others not...

The Saturday was primarily spent mulching the various ingredients in a giant vat before leaving it to simmer for a few hours -during which we were left to our own devices -Sam, Pat and I resorted to wandering the streets and playing Pooh sticks of all things in the village's stream.

We then spent most of Sunday naming our new creation, I really dislike trying to name things, naming my company "The Site Doctor" was hard enough but something that came over time, we had a matter of hours to name the beer and create the label. We went round in circles trying to think of something witty yet meaningful, comical yet serious. In the end we settled on "That" with the slogan "Making Life Taste Bitter" -I can't say it was my first choice but the majority ruled.

It was a good 6 weeks before Nether Stowey Brewery finally sent us the products of our weekend of hard work. Carefully packaged in a large cardboard box were 12 bottles of fine ale. I for one (as I'm sure is true with the rest of the group) was not sure what to expect from them so decided to store them away for a special occasion. When I did finally crack one open, I was pleasantly surprised, I can't say it's something I would choose to buy in a pub but it was certainly more drinkable than I was expecting! I've still got a few bottles remaining so if you are -or were- the recipient of one of my bottles, you were either very much liked by me -or disliked, depending on your outlook ;) Needless to say the "Gaunt Brewery" will remain little more than a dream for now...

If you're interested in learning how to make beer, why not try out Nether Stowey's beer making weekend for yourself? I would think it'd make a good stag do. Check out www.4ale.co.uk for more information.

Saturday, July 28, 2007 1:36:55 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, July 25, 2007

When we got our own dedicated server we needed to start working out a fair number of processes and decide upon a structure that was replicable, scaleable and manageable on a large scale, although the solution we've ended up adopting may not be the best, it certainly works for us.

One thing that has been bugging me however is the location and folder naming convention of the log files -for both the web hits and FTP hits. Typically, shared hosting solutions place the log files under the same folder as the one your website's root is situated but as we had no plans on giving our clients access to these logs this was an unnecessary task so we left them collecting in the default folder.

Leaving the log files in the default folder meant downloading them was very simple, all I needed to do was point our download script at the main folder and that was it, all would be included, the catch however was that the folders weren't named logically* instead they seemed to include some form of ID that was relevant to and assigned by IIS i.e. W3SVC1.

*By this I mean human readable i.e. domainname.com

Until recently I've not worried about analysing the log files beyond one or two clients whom I could manage fairly easily but now with the inclusion of a host of other domains on the server I needed a way of quickly and easily identifying the folders and which domains they related to.

Historically when I needed to know which domain the log folder related to I would log onto the server, open IIS, open the properties of the domain, click on the log file properties and below the folder directory would be the folder name, that's fine if it's only a handful of domains but what when it's say 20? That's 2mins each (with cross referencing etc) so that's 40minutes. I needed an automated system!

As it turns out, Microsoft have been kind enough to provide us with an interface we can easily code against in .Net so after a little Google-ing I wrote a number of little helper applications.

This little console application simply loops through all the domain names on the server it's being run on (the default instance of IIS) and outputs the relevant log file and folder path into a handy text file. I'll post in another post about how I use this file.

For convenience's sake I have this run on a nightly basis and the text file output to the root of the log file directory, that way when I download the logs during the next day I get the latest update of log file locations and domain names :)

Download the IIS WWW and FTP log file location exporter.

1 Year Update: I've posted the source for the IIS WWW and FTP log file location exporter here.

Wednesday, July 25, 2007 4:18:42 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 
# Tuesday, July 24, 2007

If you're a semi-regular reader of my blog you'll know that I'm a great believer of having goals and targets to meet when you setup in business. As I mentioned in my mini series on starting up in business, these targets have to be achievable and quantifiable.

Recently however I have had a couple of pretty zany ideas passed by me which, at first sight may sound completely nuts and unachievable but I've been left wondering why that is. I have always felt that The Site Doctor is a foundation for something larger but quite what that is I have no idea at the moment but one idea that's readily stuck with me is one that Rich Davies and I merely jested about -buying a big, expensive yacht and sailing it around the Caribbean for the rich and famous.

I've put this idea to a couple of people since and every time they've laughed. I can understand why they see it as a joke but why should it be? When I first setup in business I had a surprising number of people assure me I was mad and it would never work so why should this idea be any different? Ok the investment involved is on a scale way out of the league of The Site Doctor but I still don't feel it's unachievable if the time and effort is put into it.


What do you think? Is thinking big just a waste of time in your eyes or is it more speculative than wasteful?

Tuesday, July 24, 2007 12:38:20 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  |