in

code for eternity !!!

community website for .net freaks ;-)

Technology

February 2008 - Posts

  • Creating Self Signed SSL Certificates on IIS 6.0 and Windows Server 2003

    If you need to deploy and test your code in SSL environment on IIS 6.0 and Windows Server 2003, but you do not have a valid SSL certificate on your development / test server issued by a trusted third party Certificate Authority (since it costs money), you can easily do so by creating a self signed test certificate using a tool called SelfSSL which comes with IIS 6.0 Resource Kit Tools. SelfSSL is a console line application which is free to use :-). You can download IIS 6.0 Resource Kit Tools from here.

    After downloading and executing this kit, make sure you either choose Complete installation option or if you choose Custom installation option, make sure you have selected the SelfSSL feature. See below step by step screen shots for the Custom installation option.

    Step 1: Click Next.

    Step 2: Choose I Agree and click Next.

    Step 3: Enter appropriate details and click Next.

    Step 4: Choose Custom installation option if you just want to install SelfSSL else choose Complete installation option to install all features and click Next.

    Step 5: Enter the installation location and click Next.

    Step 6: Select SelfSSL and click Next.

    Step 7: Review settings and click Next.

    Step 8: Click Finish.

    Once you have successfully installed, click on Start > All Programs > IIS Resources > SelfSSL > SelfSSL to run the SelfSSL utility. On doing so, you should see the command prompt along with help instructions (see below screen shot).

    If you simply type selfssl.exe and press enter, it would use the default settings to install the SSL certificate which are equivalent to:

    /N:CN=<YOUR COMPUTER NAME> (common name of the certificate)
    /K:1024 (key length of the certificate)
    /V:7 (validity of the certificate in days)
    /S:1 (ID of the site to which the certificate needs to be installed)
    /P:443 (SSL port)

    Type selfssl.exe and press enter, then type y and press enter again to confirm the installation (see screen shot below).

    The most important option here is the site id parameter and SelfSSL uses the site id 1 by default which maps to "Default Web Site".

    To find the site id for any website in IIS 6.0 you can simply execute iisweb.vbs /query "<NAME OF THE WEBSITE>" from command prompt (see below screen shot).

    In the above screen shot, you can clearly see that I executed iisweb.vbs /query "Default Web Site" to find the site id for "Default Web Site" which is "W3SVC/1", however we are only interested in the text which follows "W3SVC/" which is "1".

    Suppose you had another website by the name "RajTest" and you wanted to install a test SSL certificate having common name "RajTestCertificate" valid for 10 days to "RajTest" on port 444, you would first find the site id for "RajTest" by executing the following command at command prompt: iisweb.vbs /query "RajTest". Once you know the site id for "RajTest" (lets assume it was "1234567") you would execute the following command at the SelfSSL command prompt: selfssl.exe /N:CN=RajTestCertificate /V:10 / S:1234567 /P:444

    Cheers,
    Raj

    ~~~ CODING FOR ETERNITY !!! ~~~

  • Building a Web 2.0 Portal with ASP.NET 3.5

    I recently purchased this great new book named Building a Web 2.0 Portal with ASP.NET 3.5 by Omar Al Zabir and I would highly recommend this book to any architect or developer who is interested in learning how to design and develop world class highly scalable ASP.NET web portals using the latest and coolest Microsoft.NET technologies like ASP.NET 3.5, LINQ, Windows Workflow Foundation (WWF), ASP.NET AJAX, etc.

    To me, this is one of the best books ever written on ASP.NET because unlike most other books, this book deals with real world problems which architects and developers face with heavy duty ASP.NET websites and provides really simple tried and tested solutions to solve the same. This book is less of theory and more of real world code and ASP.NET tips and tricks. Great job by Omar.

    Click here for more info on this book or even better, buy this book right away from Amazon here :-)

    Cheers,
    Raj

    ~~~ CODING FOR ETERNITY !!! ~~~

Powered by Community Server (Non-Commercial Edition), by Telligent Systems