Windows: Generate CSR key with IIS7

This article used to guide you on how to generate CSR(Certificate Signing Request) key from IIS7.

1. Select Start ->¬†Administrative Tools -> Internet Information Services (IIS) Manager or run from Windows Run with command “inetmgr”.
2. In the IIS Manager, choose your server name.
3. In your Middle panel, select Server Certificate.
4. Select on the “Create Certificate Request option”¬†in the right panel.
5. In the Wizard, enter your information like image above.
6. Next, remain the service provider and change the bit length to at least 2048. You are advise to select 2048 and above for better security.
7. Save your certificate.

To list all of your file through IIS7

When you hosted your website with IIS7, you might want to list all of your file to let your user to download it.

By default, you will get the error as below.

To get this fixed, refer to the step as below.
1. Open your IIS7.
2. Browse to the website sites.

3. Click on the Directory Browsing.

4. Select on Enable and you should be able to list your file.

PHP with MSSQL not working

Sometimes you might wonder why you are not able to connect from PHP script with your MSSQL database as you have enabled php_mssql.dll extension from your php.ini.

Below are the step to resolve this issue;

But before we given the solution, you might get the following error message, however the error might just unable to connect to the MSSQL database without any further detail.

Assume you were using IIS6/7 with PHP 5.2.x(Microsoft Windows Server 2003/2008),  you might get such issue if you are install the PHP with source installation.


Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: localhost:1433 in C:\Domains\wwwroot\php_mssql.php on line 5
Couldn’t connect to SQL Server on localhost:1433

1. Download file ntwdblib.dll from URL of
2. Go to the server hosted for your PHP script.
3. Go to PHP directory, assume you are using C:\Program Files\PHP5.2.x\, backup original ntwdblib.dll.
4. Replace the file as downloaded from Step 1.

Test again, and your problem should resolved.

You may refer to the URL as below for more information on the PHP_MSSQL connect page available from PHP.Net