Thursday, February 28, 2008

Resize the virtual harddisk size

As a developer, I need to test the applications written in different version of Windows OSs, sometimes also need to try out the new beta products, and of course, to run the application without the Vista's UAC. I need to cultivate the environment for simple virus as well (very dangerous for a beginner like me). I like to use Virtual PC since i can get all these advantages.

If the disk space is running out, the virtual OS will keep notifying you to clean up more space. It is quite annoying to clean up the space to move on.With the VHD Resizer, you can add more space to extend the life span of your virtual environment.

1. After download and install the VHD Resizer, you will be greeted with Open File Dialog:

2. then you will come to the VHD Resizer main UI, insert the new vhd file you want with the new file size, the disk space allocation will start.

3. After minutes, the allocation will finish. But your job is not done yet. You would not get the result instantly. You need to go to Disk Management and partition the new disk space.

4. You will be greeted another wizard : New Partition Wizard. Use the default values for each settings.

5. The disk formatting will be completed fast and easily.

6. The actual file size for the vhd resized is not increased tremendously, I think 70 MB is used for partition the disk space, since later the hard disk space will expand dynamically.

7. Done. You will be freed from the virtual disk space problem!

Monday, February 18, 2008

Little Update for C# Clock widget

Several months after posting the C# Clock widget on CodeProject, finally I managed to add some useful features into it. There are:

1) Customizable/Load and save user settings. User will be able to customize the application based on the feature they like, and it will load also on every start. In this case, the color of the hands and alarm message. (Part of the UI design refers from CodingForFun)

2) Localization, although it will no longer standalone (it will need satellite assemblies for localization). Currently it supports english and simplified chinese, other locales will fall back the english version though.

3) Alarm. User can enable the alarm so that this widget will notify the user on certain occasion.

4) Call the system clock. This is a context-menu to summon the system clock, maybe it's redundant, since user can by-pass it through the taskbar

You can get the source-code and installer here.

Monday, February 4, 2008

550: Access is denied. Why cannot delete files on FTP server?

FTP is quite popular for transfering the large files since old days. One of the problem that I face previously is this: 550 (foo.txt) : Access is denied, when issuing a delete command from application on client side.

After looking the setting level for the FTP at IIS, I found the user has the right to read/write, but this problem still happens on issuing a delete command. I wonder what went wrong???

A check on the file properties on the server side, I found this file has a read-only attribute!

By modifying the attribute, the delete command is able to delete the file again. I think the application on client side does not have the ability to check the file's attribute, at least for Windows FTP service (Unix should have such ability, using: ls -l ). So the workout is the server side must set the attribute implicitly, through FileAttributes Enumeration.