Friday, August 12, 2011

Record steps to reproduce a problem...

As the title above suggest, there's a free tool included on Windows 7 (Pro and above) that really useful for developers to troubleshoot problems on their product. The tool name is "Record steps to reproduce a problem", it's kind of obvious isn't it?

Search for the tool


Start recording and do your stuff


How to use it? Simple, click your Windows button and search for "record steps". You'll see the tool appear on menu and then click it. To start the session click "Start Record" button. Do your stuff and stop recording by clicking "Stop Record" button. A file dialog will appear for you to save the recorded session into a zip file. Unzip the file and you'll get the report in mhtml format.

Stop recording and save the session


This remind me the days when trouble shooting was my main activity while working at my previous company. Life would be easier if I had found this tool earlier.

Report header


Report details

Wednesday, June 29, 2011

Google+ is a Facebook with improvement...

Google strikes again, this time with the new social network service called Google+ (just wonder why + symbol instead of the word 'plus', perhaps that's the lesson they've learned from Buzz). The name seems to suggest like it's some kind of programming language instead of a service but who cares, as long as it has good features, that's going to be a strong attractive point.

Feature that I really love the most (based on my readings so far) is Circles. On Facebook, I find it hard (or maybe not possible at all) to post something to a specific group of people (more than 5) from within my friends list. Circles is the answer for that, it's like a combination of grouping and sharing. You can post something that can only be view by specific circle. With this, you won't end up accidently post something that'll cause you trouble with your boss (but why add your boss in the first place?).

"Circles: The easiest way to share some things with college buddies, others with your parents, and almost nothing with your boss."

I'm late with the news. It's been rolled out since yesterday (28/06/2011) on a very limited field trial. Try to join at https://plus.google.com, unfortunately it's already exceeded their capacity. It seems to me that Google is using the same approach as they did with Gmail. Started with very limited field trial, via invitation then only goes to public. This way, they've successfully create the hype for the service (again). Whether the service is going to succeed or not that's a different story.

Tuesday, May 10, 2011

Validate user against LDAP...

    ...
    using System.DirectoryServices;

        ...
        public bool IsValidLDAPUser(string userName, string password, string ldapPath)
        {
            DirectoryEntry entry = new DirectoryEntry(ldapPath, userName, password);
            DirectorySearcher searcher = new DirectorySearcher(entry);
            searcher.SearchScope = SearchScope.OneLevel;

            try
            {
                SearchResult result = searcher.FindOne();
                return result != null ? true : false;
            }
            catch
            {
                return false;
            }
            finally
            {
                if (searcher != null) searcher.Dispose();
                if (entry != null) entry.Dispose();
            }
        }
        ...

Thursday, May 5, 2011

Validate webservice client via SOAP header...

First, the SOAP header
    namespace SecureWebServiceDemo
    {
        using System;
        using System.Web.Services.Protocols;

        public class MySoapHeader : SoapHeader
        {
            private string _userName;
            private string _password;

            public MySoapHeader()
            {
            }

            public string UserName
            {
                get { return _userName; }
                set { _userName = value; }
            }

            public string Password
            {
                get { return _password; }
                set { _password = value; }
            }
        }
    }
Next, the webservice
    using ...

    namespace SecureWebServiceDemo
    {
        /// 
        /// Summary description for MyWebService
        /// 
        [WebService(Namespace = "http://tempuri.org/")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [ToolboxItem(false)]
        public class MyWebService : System.Web.Services.WebService
        {
            public MySoapHeader _header;
            private const string _userName = "testuser";
            private const string _password = "123456";

            [SoapHeader("_header")]
            [WebMethod]
            public string HelloWorld()
            {
                if (_header == null || _header.UserName != _userName || _header.Password != _password) throw new Exception("Invalid User");
                
                return "Hello World";
            }
        }
    }
Finally, the client side
    ...
    
    localhost.MySoapHeader header = new localhost.MySoapHeader();
    header.UserName = "testuser";
    header.Password = "123456";

    localhost.MyWebService test = new localhost.MyWebService();
    test.MySoapHeaderValue = header;
    Console.WriteLine(test.HelloWorld());
    
    ...

Saturday, April 30, 2011

My 5 minutes on Ubuntu 11.04...

  • New UI looks nice (but I prefer the old one)
  • New style scrollbar makes me confuse a bit (but it's one of the good thing that I like)
  • Apps menu appear on top panel instead of on its own window (except for Libre Office apps)
  • Quick search for apps (very helpful if you know the name)
  • Unable to customize panel
  • Enabling desktop cube via ccsm will cause top panel and app launcher stop responding. Windows border disappear
  • Overall, I don't like it. I'm glad that I switched to LM last year.

Wednesday, April 20, 2011

SARDU vs YUMI...

  SARDU YUMI
Multibootable USB Yes Yes
Multibootable CD/DVD Yes No
Support XP/7 installer Yes Yes, with some tweak. Please refer to Very Important note here.
Support Linux installers Yes Yes
Summary Pros:
  • Works on Windows (XP/7) installer flawlessly.
  • When tested with Windows 7 Ultimate, SARDU somehow exposed an option to install different flavor of Windows 7 in the installer.
  • Ability to put the installers into an iso and burn it into CD/DVD.
  • Doesn't required to be install on machine.

Cons:
  • Need to copy the iso's into ISO folder for SARDU to detect it.
  • Need to rename the iso's into specific name listed on SARDU website.
Pros:
  • Iso's need not be renamed nor required to be in any specific path location.
  • More recent Linux version available in the supported list.
  • Doesn't required to be install on machine.

Cons:
  • Unable to put the installers into an iso file and burn to CD/DVD in case if needed for machine that couldn't boot via USB.
  • Have some minor issue with Windows 7 installer. Check the workaround at Very Important note here.


Update (25/05/2011)
There's a new multiboot iso creator tool call XBOOT. In terms of usability it is straight forward. Simply drag and drop the ISO's (love the drag and drop features). However the downside is that it require .NET framework 4 to works and didn't support Windows installer.

Conclusion:
For multiboot iso creator, if you're on Windows system and
- want to use the tool to create the usb/cd boot that support both Windows and Linux installer, go for SARDU
- want to use the tool to create the usb boot (and not even bother about cd boot), go for YUMI
- want to use the tool with nice GUI to create the usb/cd boot (and not even bother about Windows installer), go for XBOOT

Bottom line is, it's all about choices. Choose the best tool that will suit your need.

Wednesday, April 13, 2011

Creating Windows USB startup disk...

As written in my previous post, I would like to test a couple of USB startup disk creators for Windows (that can put our beloved Windows installer into USB device). So now, here's the result. I would say that SARDU (imho) is the best tool currently available. Bonus part, you don't even need to install. Simply extract the zip file and voila! you ready to go. Here's the step by step on how to:

1) Download the zip file from here.

2) Extract it into your D:\ drive.

3) Go to extracted folder and copy your windows installer (in .iso format) into ISO subfolder.

4) Rename the iso file based on OS like listed below:
  • Windows Vista - InstallVista.iso
  • Windows 7 - InstallWin7.iso
  • Windows XP Home - Install_XP_Home.iso
  • Windows XP Pro - Install_XP_pro.iso
  • Windows XP 64 - Install_XP_x64.iso

ISO folder


5) Execute sardu.exe, notice that your Windows installer has been detected by SARDU.

Windows installers detected


6) Plug in your USB thumb/pen/whatever you may call it drive and click "Search USB" button. Make sure it's using FAT32 file system (otherwise you may need to re-format it).

USB device detected


7) Once your USB pendrive detected, click button with pendrive icon to start the process.

Processing...


8) Once completed, close SARDU and unplug your USB pendrive. Plug it into any machine that support boot up via USB, restart and press boot menu key (F12 for Dell). Select USB device and you're in.

SARDU boot menu


Note:
Tested with Windows XP Pro and Windows 7 Ultimate 32-bit installer.

If you just need Windows XP installer, 1 GB pendrive should be sufficient enough.

For Linux users, MultiSystem does support Windows 7 and XP installer via syslinux and grub4dos option respectively. However from my test result, it only works for Windows 7. No luck for XP.

Update (14/04/2011)
I forgot to mention that if you want to install XP on SATA hard disk, you need to slipstream the driver into the installer. This can be done via nLite. Reference to SATA drivers for XP. However, I'm still unable to make my slipstreamed installer works.

Update (15/04/2011)
It's difficult to test the slipstreamed installer on VirtualBox. Solved the first BSOD by changing disk type from IDE to SATA. Second BSOD (happened at second stage) might be due to the different type of SATA driver required by VirtualBox. Wish I could get a real machine soon.

Update 2 (15/04/2011)
Slipstreamed installer works!!! Tested on real SATA hard disk. Perfect solution for netbook (USB pendrive + XP installer + SATA drivers).