Friday, December 15, 2006

NORAD tracks Father Christmas

This is becoming a Christmas tradition in our house:

Wonderful :)

IE error when exporting from ASP.NET DataTable to Excel

I have written some code which takes the contents of an ASP.NET DataTable, turns it into tab delimited format, and writes it to the Response object so that the user is presented with an IE Open/Save dialog. Open creates a new Excel instance and displays the data within, and Save allows the user to save the file locally.

This all works perfectly over our local development LAN, but when we released it to acceptance on our remote production server the following error was displayed whenever the Open button was clicked, and a similar error on Save.

'Internet Explorer was not able to open this Internet Site. The requested site is either unavailable or cannot be found. Please try again later.'

After some poking around it seems that this has been a bug with IE (surprise, surprise) since v4.0, and occurs when no-cache is set on a page in a site with an SSL certificate.

To fix it use the following (VB) code:

Response.AddHeader("Cache-Control", "max-age=0")

A full explanation of the workaround can be found here.

Wednesday, December 13, 2006

Hugo Glossary

My son Hugo has come up with some interestingly mangled words since he's been speaking. Here are some of them:

Baksoo n. Breakfast.
Dabby Yabby n. Hugo's gro-bag comforter.
Dadoo n. Grandad.
Darsosaur n. Dinosaur, including flying and swimming reptiles.
Emohrgency n. Emergency.
Fahngee n. Fire engine.
Gagoo n. Hugo.
Gagoo Telly n. CBeebies.
Hostiple n. Hospital.
Numnum n. Auntie Catherine.
Roro n. Dog.
Up Woowoo n. Attic.
Vava a. Fast, for example 'Vava woowoo.'
Woowoo n. Train.
Wospits n. Wotsits.

Tuesday, December 05, 2006

Making a dual boot Windows partition bootable

As I mentioned in Part 1 of the HTPC saga I was recently faced with the problem of reducing a multi boot setup spread over two physical and three logical drives into two bootable disks in two distinct boxes.

The setup was as follows:

Physical disk #1:
GRUB boot loader
Win XP Pro

Physical disk #2:
Win XP Media Centre Edition
Linux Fedora Core 3

A small portion of the MCE drive was partitioned off with the Fedora distro, and in order to triple boot between XP, MCE and Fedora there was a GRUB boot loader in the MBR of the primary drive.

Removing GRUB was actually quite straightforward (this is detailed in a separate post,) and PartitionMagic dealt with the Linux partition nicely, absorbing it into the MCE partition. This left me with a standard dual booting Windows box: XP on primary and MCE on secondary.

To cut a long story short this is how I eventually configured the system to boot from the MCE drive.

1. Removed GRUB.
2. Used PartitionMagic to remove Linux partition.
3. Edited XP boot.ini file to remove the MCE install.
4. Booted from XP CD and repaired MBR on MCE drive.
5. Added boot files to the root of the MCE drive.
6. Edited MCE boot.ini file to point to primary drive (remember the partition array is 1-based!).
7. Unplugged ribbon cable from XP drive and plugged into MCE drive (changing the jumper to CS or Master).

Aside from replacing hal.dll (which was unecessary and meant MCE reinstalling a load of drivers), and not realising that the boot.ini partition array is 1-based, it all went pretty smoothly I thought :)

BT offer unlimited broadband

I've used BT Broadband for many years now, and overall I am very impressed by the speed, reliability and price.

I actually downgraded to Option 1 a year ago, reducing the bill from £29.99 to a much more respectable £17.99 a month. At that time my bandwidth usage was not too high (consisting mainly of online gaming,) but even though I probably exceeded Option 1's meagre 2GB limit regularly I never received an email from BT's so-called FUP (Fair Usage Policy) people.

Recently however I have developed something of a torrent habit, and I discovered that BT do send out FUP emails, but only when you exceed the limit by a considerable amount; in my case by 46Gb :)

'Time to look for an unlimited account,' I thought. 'Shame that BT don't offer one.' Their premier product, Option 4, is capped at 50Gb for £29.99 a month.

But when I read the FUP email a second time it suggested that I upgrade to Option 3, which offered unlimited usage.

After a bit of checking around it seems that BT are abolishing Option 4 and making Option 3 unlimited for £26.99 a month. This is not yet reflected on the BT website, which still states that Option 3 has a 40Gb cap, but rest assured it is the case.

You can read more about it on Digtal Spy.

How to remove GRUB

GRUB is a third party boot loader that I used for a while as a means of triple booting between Linux and two Windows installs.

When it came time to restore the system to single boot I was faced with the question of how to remove GRUB without damaging any of the Windows installation.

The process was surprisingly straight-forward, despite some worrying posts I read on the Intertron.

This thread contains some useful info, but this is all I had to do:

1. Alter your BIOS to boot first from CD
2. Boot from the XP CD
3. When prompted select Repair
4. At the C:\WINDOWS prompt enter the following commands:

CD ..
BOOTCFG /rebuild

5. Reboot and change BIOS back to boot from HDD
6. If necessary edit the boot.ini file to remove any lingering OS entries that you no longer need.

Job done :)

Building an HTPC - Part 1

I've been wanting to build a Home Theatre PC (HTPC) around Windows Media Centre Edition for some time now, but I didn't want to shell out for new hardware until I had fully evaluated MCE and tested that it would fit into our living room without causing too much disruption.

The first stage of the process was to acquire a copy of MCE. As I have an MSDN subscription this was not a problem :)

Stage two was to install MCE on a second hard drive so that if the evaluation went well I could simply drop the drive into the HTPC when it was built.

This was complicated slightly by a (very) brief flirtation with Linux. More on this and the joys of GRUB removal later.

Once MCE was successfully installed and the system was set up to dual boot both the existing WinXP Pro install and the new MCE installation I checked out the Media Centre UI and found that I liked it enough to purchase a MCE compatible DVB-T TV card.

A trip up a ladder with some cable cutters and an hour in the attic with a drill saw the sneaky diversion of a coax aerial cable from my son's room (he's only four, he didn't even know he had an aerial point!) to the house IT hub (the attic), and I found myself immediately in love with watching and recording Freeview through MCE.

So far so good. The next step was to test the whole thing in the living room with our old 4:3 Hitachi telly. This called for some decisions regarding cabling. The HTPC was running a Radeon 9600SE with DVI, VGA and s-video outs. Ideal really, as I can eventually use DVI when we get an LCD TV, and in the meantime s-video to SCART would work well on the old Hitachi.

The next thing was audio. I managed to find a cable in Maplins with a male SCART on one end and an s-video and two (red & white) phono connectors on the other. So the final cabling had a 2 phono to 3.5mm stereo adaptor splitting the audio signal from the HTPC sound card into the red and white cables, and the s-video carrying the video signal, all going to the SCART socket in the back of the telly. A bit of experimentation found that only the AV2 SCART socket could be s-video enabled, and once this was confgured in the TV's settings the HTPC worked perfectly, giving a clear picture and good stereo when in the Media Centre. The Windows desktop didn't display so well unfortunately, but it was usable in 800x600 and this is to be expected on an old TV. Also this will cease to be a problem when an LCD telly is finally connected up. (I've decided to wait for 1080p to come down in price before splashing out: I just hope it's months rather than years away!)

One thing to note is that I also tried connecting using s-video to composite in (yellow socket) on the telly, but the quality was very poor. I had read that composite video was slightly worse quality than s-video, but was surprised at how bad it looked. S-video to SCART is really the only way I found of getting a good quality image in MCE on a non-HDMI TV.

So, I had one HTPC working very well in the living room, with two problems. Firstly it was still set up as a dual boot system and I needed my WinXP Pro drive back for my new gaming rig, and secondly the case and fans made the thing sound like a F-15 on rotation.

Now firmly convinced that both my and my family's very lives depended on getting the HTPC working silently in the living room I did a bit of research into silent PCs. I finally plumped for a Silverstone LC16B case and a 430W Coolermaster iGreen silent PSU.

The plan was to take the components out of the noisy case and install them in the silent enclosure, then build a high spec gaming rig in the old case using new components and the old WinXP hard drive (for now).

Before the two builds could begin I needed to make the drive containing MCE bootable, preferably without having to reinstall the OS. (This drive is the home of my BSG and Heroes torrents among others, and backing them up would be time consuming to say the least.)

There were a couple of problems. First off a small portion of the MCE drive was partitioned off with a Linux Fedora install, and in order to triple boot between XP, MCE and Fedora there was a GRUB boot loader in the MBR of the primary drive.

You can read how I dealt with the problems in this post.

Now the drive boots perfectly as if it had always had its very own MBR :)

I'm starting the build tonight, so we'll see how silent the HTPC really is...

Wednesday, June 28, 2006

Frickin' e-tard!

e-tard n. A person who is utterly clueless when faced with technology, particularly computers.

Monday, February 27, 2006

Momentous Phrases

As we blithely travel along life's highway we and our friends are accompanied from time to time by amusing phrases gleaned from the popular culture of the moment.

Although some of these phrases stay in common usgae for years on end other die out only to be rediscovered while watching one of those damn 100 Best list programmes on Channel Four.

After seeing the Eddie Izzard 'monkey on the branch' sketch again I am inspired to compile a list of past and present phrases.

1991? - The Mighty Sword of Dobber (where did this come from?)
1996? - "Nighty night, The Fury" (Game On)
1998? - "Le sange est sur le branch" (Eddie Izzard)
2004 - "Avit!" (I think this originally came from an advert)
2005 - "Very nice, very tasteful...I love all that." (Blessed)
2005 - "Shake me up, Judy!" (Bleak House)
2006 - "I'm 'aving 'oops!" (Life On Mars)

Clearly we need a few more phrases from the 90s and early 2000s. Can any of my friends recall other phrases or words that used to be in common usage?

Monday, January 30, 2006

Narrowscreen Telly

Recently acquiring my first widescreen television has confirmed something I've suspected for some time. The majority of people these days seem to watch distorted TV where people's faces are stretched in width to fill the screen.

Of the formats available I tend to watch in 4:3 mode, which means a black border around the picture, which is actually smaller than on my old 4:3 telly, but at least it's in proportion.

The other option for viewing of normal television programming is the 4:3 zoom, which at least fills the screen more, but at the expense of losing some of the picture. And losing picture is exactly what I wanted to avoid with a widescreen TV.

So, what to choose? A stretched and distorted picture, a small picture, or less of a picture?

It seems to me that about the only advantage of widescreen televisions is when watching widescreen films :(