FtpWebRequest bug

I’ve just run into what appears to be a bug in .net’s FtpWebRequest class. I wrote some rather inefficient code that requested the same directory listing from the server several times, and found that it hung the second or third time it made the request. After some googling, I found an explanation. It seems that it caches some of the objects it creates and retrieves them from a pool, which is fine, but if it finds that the request is identical to the existing one it doesn’t reopen the response socket, so when you try to get the response stream it hangs. It’s a simple fix in my program, just save the result of the list request, but it would make it very difficult to write something that works by polling the contents of an ftp folder.

Ejecting recalcitrant USB disks

I’ve got a couple of USB SATA caddies that I often have problems with when I try to remove them safely to switch them off. The disks in them are seen by the system as fixed drives, and the System process (pid 4) often opens some system files (in the $extend folder) on them that prevent the USB device being removed. Because they are seen as fixed drives there’s no Eject option in Explorer.

I’ve finally discovered how to eject them safely. Open Disk Management (either through Control Panel, or just running diskmgmt.msc) and set the disks to be offline by right clicking on the disk name in the lower panel. Then they can be ejected. The only problem is that they will remain offline, so you need to make them online again before they can be used next time.

Setting up a simple Windows 7 VPN

Although I work mostly from home, I rent a hot desk at a local business centre, and take my laptop in there to work on a couple of times a week just for a change of scene and because I get a large discount in their cafe. I often need to connect to my home network while I’m there, and I’ve been doing it by having a remote desktop port open on the router. This is far from ideal, and so I decided to set up a VPN. Both the home PC and the laptop are running Windows 7 Ultimate, which has VPN built in, so it should have been a 10 minute job, but it wasn’t. It just took me all morning to get it working. Continue reading “Setting up a simple Windows 7 VPN”

Radio Player and TP-Link router faults

When I first released the Radio Player it all worked fine for me and others, but one person reported having problems with it. When he ran it, it would have trouble connecting to streams and once connected it kept dropping out. I couldn’t reproduce the problem at the time. Continue reading “Radio Player and TP-Link router faults”

Cuemaster

My main client went into Administration last week, leaving me with very little work to do until I can find another contract, which is proving a little difficult.

This has, however, given me the chance to get on with writing Cuemaster. This is a Windows program that Trevor Learoyd recently bought the rights to. After looking over the code I decided it needed a complete rewrite, which I have almost completed. Continue reading “Cuemaster”