Nik's Technology Blog

Travels through programming, networks, and computers

Storage for Plex Movies

I had already installed Plex Media Server on my PC and had been pleasantly surprised by how good the software was, so much so that I now wanted to rip all my DVDs to hard disk. After a few calculations I figured out I would need quite a bit more storage to hold all my ripped DVDs for use with Plex Media Server.

Originally I thought that a NAS device might be the way forward. I could get a four bay device for future expandability, and upon first glance it appeared that PMS would run on selected NAS boxes too. I almost bought a four bay Netgear ReadyNAS, until I read that the CPU in most NAS boxes just isn't up to the task of transcoding video.

That would mean the NAS would just store the content and the PC would need to be switched on to act as the Plex Server. This to me, just didn't seem worth it.

Why not just add some extra hard disks to my PC I thought? But what about the added benefit of RAID you get from a NAS?...

I ended up buying some 4TB WD Red NAS hard disk drives and using Storage Spaces in Windows 10 to set up resiliency, mimicking the RAID you get from a NAS box.

Configuring FTP for Windows Server 2008

Setting up FTP on Windows Server 2008 isn’t as easy as in previous versions and the steps you need to take vary depending on what version of IIS you have installed.

Unless you upgrade to IIS 7.5, FTP in IIS 7 is still managed with IIS 6 Manager!

FTP configuration in IIS 7

Failed to Retrieve Directory Listing

The first hurdle I encountered when trying to connect using Filezilla was the error message “Failed to Retrieve Directory Listing”.  Filezilla was able to connect but couldn’t list the files in the remote folder.

A work around to this is to run Filezilla in active mode (Edit > Settings > Connection > FTP > Active), but some programs that use FTP such as Windows Live Writer can’t be set to use active and prefer passive FTP.  Read more about active and passive FTP.

Configuring Passive FTP on IIS

Configuring Passive FTP on IIS essentially involves configuring FTP port ranges in IIS for the passive connection and then opening up those ports in Windows Firewall on the server.

Depending on what version of IIS you have installed I can verify that both of these methods work.  Although the c:\Inetpub\adminiscripts folder didn’t exist on my server so I ended up getting them from a Windows Server 2003 machine.

My advice would be to upgrade to IIS 7.5.

Installing Hardware RAID on Windows 7

Like a lot of Windows fans I pre-ordered Windows 7 and built a new PC ready to install it on; I chose a motherboard (MSI DKA790GX) that, like many on the market, has a hardware RAID controller on-board allowing you to take advantage of redundancy with RAID 1 and/or benefit from faster disk access with RAID 0.  Read more about RAID.

I had already installed Windows 7 before I remembered I wanted to set-up a RAID 1 array.  I tried to get the RAID array working with Windows already installed but soon realised I would have to set it up prior to installing Windows 7 because Windows kept hanging on boot-up because it was lacking the RAID controller drivers.

The supplied manual doesn’t explain how to get RAID up and running unfortunately.

RAID Controller Set-up

So here’s a quick guide to installing hardware RAID on a motherboard that features a RAID controller.  These steps assume you are performing a clean Windows 7 install rather than an upgrade, and they might differ depending on your system set-up, but the general principles should be the same.

  1. Download the RAID drivers for your motherboard from the manufacturer’s website and save them to a memory stick.
  2. Back up all your important data!
  3. Turn your PC off and unplug it.
  4. Install 2 hard disks preferably with identically capacity into your PC.
  5. Turn on your PC, press the delete key or F2 key when prompted to get to the BIOS menu.
  6. Find the option to select the RAID mode, save your settings and exit BIOS.BIOS RAID options
  7. On reboot you should see a new menu option to enter the RAID controller settings.  Enter the key combination when prompted to get to the RAID controller menu. AMD RAID controller menu
  8. Create a new RAID array selecting either RAID 0, or RAID 1.
  9. Select the disks that will form the array, save the settings and exit.
  10. On reboot press the delete key or F2 key when prompted to get to the BIOS menu.
  11. Check the boot sequence of your PC and ensure your optical drive is top of the list.BIOS boot sequence options
  12. Insert your Windows 7 disk into the optical drive and exit the BIOS.
  13. On reboot press any key when prompted to boot from the optical drive.
  14. Windows 7 should start installing.
  15. Select your localisation settings and click next.Windows 7 localization menu
  16. Click “repair your computer” and click the ”load drivers” button.Windows 7 install menu Windows 7 load drivers menu
  17. Insert your memory stick and browse to the correct driver and install.
  18. Exit back to the Windows 7 install menu click “Install now” and on the next screen click “Custom (advanced)” to perform a clean install.install-windows-custom
  19. When you are asked where you want to install Windows 7 you should see that the 2 RAID hard disks are now visible as just 1 drive.
  20. Add a partition to the new drive so Windows with be able to recognise it.
  21. Continue installing Windows as normal.

Create a Simple Windows Service to Request a URL at Set Intervals

I needed a simple Windows Service to request a web page at set intervals indefinitely. Windows Services are the best way of doing this as they have the ability to start automatically when the computer boots up and can be paused, stopped and restarted. You can also get them to write events to the Windows Event log.

I found this Windows Service sample tutorial on The Code Project and downloaded the code to familiarise myself with the basics. The tutorial lacked a timer and the code to request a URL though so I had to add this functionality.

Visual Studio Standard edition doesn't have a Windows Service template, but you can still create a Windows Service, you just need to do a bit of extra work.

After some research and a bit of coding I added two new methods:

private void ServiceTimer_Tick(object sender, ElapsedEventArgs e)
{
this.timer.Stop();
DoWork();
this.timer.Start();
}

void DoWork()
{
WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");

Stream data = client.OpenRead(URL to request here);
client.Dispose();
data.Dispose();
}

I overrode the OnStart() method of ServiceBase to enable the timer and start it. I also overrode the OnStop() method to disable the timer.

The DoWork() method simply creates an instance of WebClient and reads in the URL you want to request.

Then in the constructor I set the timer interval and added an event handler to raise the ServiceTimer event when the interval elapses. The event handler simply stops the timer, calls the DoWork() method and then restarts the timer.

public static void Main()
{
ServiceBase.Run(new Service3());
}

public Service3()
{

InitializeComponent();
// Duration 1 hour
double interval = 3600000;

timer = new Timer(interval);
timer.Elapsed += new ElapsedEventHandler(this.ServiceTimer_Tick);

}

To install the Service you need to publish the project in Visual Studio. Then use InstallUtil.exe following the process below:

  1. Open a Visual Studio .NET Command Prompt
  2. Change to the bin\Debug directory of your project location (bin\Release if you compiled in release mode)
  3. Issue the command InstallUtil.exe MyWindowsService.exe to register the service and have it create the appropriate registry entries
  4. Open the Computer Management console by right clicking on My Computer on the desktop and selecting Manage
  5. In the Services section underneath Services and Applications you should now see your Windows Service included in the list of services
  6. Start your service by right clicking on it and selecting Start

Each time you need to change your Windows Service it will require you to uninstall and reinstall the service. Prior to uninstalling the service make sure you close the Services management console. To uninstall the service simply reissue the same InstallUtil command used to register the service and add the /u command switch.

e.g. InstallUtil.exe /u MyWindowsService.exe

When you install the service on a server you can find the InstallUtil.exe in the .NET framework folder e.g. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

 

Time to start testing your websites in Safari on Windows?

Apple recently added their Safari web browser to the Apple Software Update and pre-checked the box by default. This effectively means that a lot of Windows users will now, possibly without knowing it, have installed Safari.
I'm not going to discuss the ethics of this practice here, instead read John's Blog - CEO of Mozilla.

But what it means for the humble web designer or developer is that we should really be installing Safari on our Windows machines and adding it to the list of browsers we test our sites against as the number of users is bound to increase as a consequence.

Apple pushed Safari web browser through their Apple Updates service

Competition in the browser business is good and over the last few years Firefox has begun to gain ground on Microsoft's Internet Explorer domination. It has also forced the browsers to become more standards compliant, thereby helping web developers and designers design cross-browser, cross-platform web pages.

According to Apple, Safari is a standards compliant browser built on the open source WebKit project, so hopefully if your pages have been built to W3C standards they will require minimal checking, but it is always wise to test. Apple have a range of web developer resources for the Safari browser, including the Safari CSS support, Safari developer FAQ, and a general web development best practices guide.

USB U3 Smart Drives: Drives That Make Your Applications & Data Portable

USB flash drives have increased in capacity in leaps and bounds since I last purchased one. In the few years since I bought a Crucial 128MB Gizmo!, the price of flash memory has been literally free-falling, due partly to economies of scale and the mass adoption of flash-based mp3 players.
The size and sheer variety of these devices is astounding, but what I wasn't expecting when I inserted the drive was for a Launchpad application to start running, pre-loaded with special software!

SanDisk u3 Smart Drive - Cruzer Micro 4GB

I had in fact purchased a 4GB SanDisk U3 Smart Drive. U3 is a technology developed by SanDisk which effectively creates a platform for developers to build applications that install directly onto the flash drive rather than the host computer. This means that not only can you take your data with you, but you can take your applications too!

U3 Smart Drive Launchpad

When you insert your U3 Smart Drive into a USB slot on any computer, the U3 Launchpad is loaded, which is effectively like the Window's start menu, but instead contains menus to configure the drive, run installed applications and access your data. Nothing is installed on the host PC, so you can take your applications and data with you and its all secure and synced with your data on your PC back home.

The software that's available includes Skype, Firefox, Opera, various password safes, Thunderbird, OpenOffice... The list goes on. Some applications are free, while others cost a small amount of money, but most have downloadable trials. Here's a full list of U3 software.

Watch the video below for a quick guide to the U3 Smart Drive technology.

Buying New PC Hardware? - Make Sure It Supports Vista!

It's fast approaching the anniversary of the release of Windows Vista to business users, home users have been buying new PCs with Vista pre-loaded since the end of January 2007.
I haven't upgraded to Vista yet; my DVD upgrade is still in its box. I've installed it a couple of times to have a play around with it, to see which pieces of hardware and software are compatible, but that's it.
There are a couple of reasons why I haven't taken the plunge. Firstly, my PC can run the new Aero UI on Home Premium, but when I add the CPU monitor widget to the desktop to see how well it copes, it tends to max my processor out just opening windows etc. This is probably to be expected with a 4 year old computer. The second reason is the hardware and software support for Vista. You would have thought that manufacturers would have started to factor in support for a new Microsoft operating system, wouldn't you?
The word that springs to mind when talking about Vista compatibility today is "patchy", and today is almost 12 months after the official launch!

Future Proof Your Hardware Purchases

Most people who buy hardware or software for their PC will be expecting it to work with Vista out-of-the-box. They don't want to be updating firmware, or worse still finding out that their new device only supports XP! Why does Microsoft bother having alpha and beta testing periods when the likes of Apple can't even make their flagship iTunes work?

My advise to anyone thinking of buying a new piece of hardware or software is to make sure it supports Vista, even if you're sticking to Windows XP for the foreseeable future. You never know when you might buy a new PC, and do you really want to have to replace your hardware once you've upgraded to Vista?

Windows Vista Upgrade Advisor and Hardware Incompatibility

Just to recap, I bought Windows XP Media Center edition with an upgrade voucher to Windows Vista Home Premium last year. After sending off all my details to claim my Vista DVD and receiving it, I thought it best to clear some room on one of my hard disks and run Windows Vista Upgrade Advisor before I go any further.
I had previously ran a beta version of the upgrade advisor prior to upgrading my OS from Windows XP Pro to Media Center edition and as far as I can remember all my hardware was compatible (software was another story!).

Problems!

However... While upgrading my machine to Media Center I also upgraded some of my hardware. I upgraded my wireless 802.11b Netgear MA111 USB stick to a US Robotics 5418 802.11g PCI adapter (This allows for video streaming around my house via my Xbox 360, and also reduces the amount of USB devices I have hanging off the back of my machine).
I was also severely running out of disk space, so I added a SATA RAID card and bought two SATA HDDs so I could set up a mirrored (RAID 1) configuration for a little peace of mind).

After running the upgrade advisor you can now probably guess what devices weren't supported in Windows Vista...Yep, the USR5418 wireless PCI adapter and the Adaptec 1210SA SATA RAID controller, typical I thought!

I have checked the manufacturers' support sections for these devices, but future Vista drivers for them don't look promising. So unless I can find a driver that will work with these devices I don't see much point in upgrading to Vista at the moment. Can you imagine the Aero interface in all it's glory, but no data to access and no web to surf on!! The only other solution is to upgrade these components again, but I am reluctant to spend anymore money on my aging computer.

Hardware Manufacturers or Microsoft?

So who is to blame for this lack of compatibility? The devices aren't exactly that old, Microsoft has had numerous beta versions of Vista available for hardware and software companies to test and develop for, but it seems they want you to buy the latest product instead. Even big companies like Apple had problems with iTunes after the Vista launch.

Windows Vista Upgrade

I finally received my Vista Home Premium upgrade DVD this morning. I got an email claiming it was being shipped earlier this month and commented on my thoughts here.

Unlike the retail versions of Vista you don't get the snazzy clear box with the rounded corner. I can't complain though, it came in a clear DVD case with a quick start guide and a new OEM Certificate of Authenticity (CoA). You may remember I bought a copy of Media Center 2005 with a Vista Upgrade voucher last year.

It also comes with a slip of paper that states the following:

Licensed Device. This Windows Vista software replaces the Microsoft Windows XP software that is eligible for the upgrade to this software. You may install and use this software only on the device on which you acquired the Windows XP software.

Reassignment to Another Device.

You may not reassign the license for this software to another device.

It also goes on to talk about transferring to a third party and support services.

This goes someway to answering some of my questions. When I get around to installing Vista I'll no doubt be adding some more posts here. I need to give my hard drives a spring clean before I can do that though ;-)

Windows Home Server

I signed up to test the new Windows Home Server Public Beta a while back and received an invitation to download and review it.

Like a lot of people I am frequently running out of storage space on my machines and needing to upgrade. I am also fairly concerned about data backups too, so much so that I upgraded my main machine a while back to include a SATA RAID 1 mirror for my core data over 2 x 320GB drives.

Most people however don't have the need or knowledge to set up a decent backup or redundancy solution, so Windows Home Server when purchased installed on a piece of purposely designed hardware should fill this gap in the market.

When I get a spare few minutes I'll download the DVD and test on an un-used machine. I'm particularly interested in the usability of the software since it will mostly likely be bought by and used by people who are not particularly technically minded.

From what I've heard it does not include Media Center (since it's a headless OS), but it features Windows Media Connect, so I'll be able to stream my music and video straight to my XBOX 360 without having to have my main machine running.