Change IIS6 ASP Upload limit

When you trying to upload a file that more than 200KB, you will never ever able to upload it or you will get a blank result instead.

The reason behind this is happened is because IIS 6 set the ASP upload limit to 200KB as default. To get this fix, you will need to change your setting from the IIS metabase setting.

First of all, please make sure that you do allow the IIS metabase to be able to edit during IIS6 is running.

1. Open your IIS6.
2. Select on your hostname.
3. Right click the properties and tick the “Enable Direct Metabase Edit”.
4. Next,  Edit the file named metabase.xml in C:\Windows\System32\inetsrv.
5. Now, search the value of “AspMaxRequestEntityAllowed” and change it to your desired value. **If you wish to change to 20MB, please input 20480000

Enable SEF on Joomla 1.6 with IIS6

I was informed by a customer that when installing Joomla 1.6 with IIS 6 server, and if you enabled SEF (Search Engine Friendly), you will get an Error 404 pages not found error.

To fix this issue, simply add the following line just after the php tag from index.php file and it will look like,


if ( isset( $_SERVER[ 'HTTP_X_REWRITE_URL' ] ) )


Configure FastCGI to Host PHP from IIS 5.x and 6.x

I want to tell everybody that I am back again after last post from Jan 2011. MGe is lost after the Celebrating the Chinese New Year(I am Chinese, 🙂 ), and it is very sad that 2 relative passed away during the past week. 🙁

Somehow, I will continue sharing my post from here, :-).

Today, I want to guide my reader on how to configure PHP FastCGI for IIS 5.x and 6.x.

i) IIS5.x or 6.x installed.
ii) PHP installed.

Install FastCGI extension,
1. Download the extension from
2. Install it and you will see it is installed to C:\Windows\System32\inetsrv folder.

Apply FastCGI extension,
i) Configure through command,
Run the follow command,

cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"

ii) Manually Configure it.
1) Run inetmgr.
2) Right click Web Site and select properties.
3) Click on Home Directory tab.
4) Click on the Configure button.
5) Click on the Add button.
6) In the “Add/Edit Application Extension Mapping”, add the following information,
Executable: C:\Windows\System32\inetsrv\fcgiext.dll
Extension: .php
Verbs: Limit to GET, HEAD, POST
7) Click OK.

Modify the fcgiext.ini file,
1) Add the following information to the fcgiext.ini file,

Set the optimal setting for FastCGI,
Set the following value to php.ini,
fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
cgi.force_redirect = 0

Set the following value to fcgiext.ini, run the following script.

cscript fcgiconfig.js -set -section:"PHP" -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000

SMTP: The service could not bind instance 1. The data is the error code.

I was helping a client server as mentioned the email form could send an email.

The server ran with IIS 7.5 with IIS SMTP services. Hence, I was trying to open the IIS 6.0 and start the SMTP services when found it is stopped.

However, when I trying to start the IIS SMTP services, it is prompt an alert.

At the same time, the event viewer is showing the error as below.

Event ID: 115
Description: The service could not bind instance 1.
The data is the error code.

With the above error, it might meant that the SMTP port of 25 is being assigned to your email software installed to the server. To overcome the problem, refer to the step as below.

1. Open the IIS 6.0.
2. Double click the hostname and right click the Default SMTP Virtual Server then click on Properties.
3. Click on the Advance button and change the TCP port to 2525.

Well done, you have done.

HELM3 Subdomain not working

Today, I was asked by HaoSiaoKing aka Kwan for this case and I am now sharing the solution.

Scenario: When create a subdomain from HELM3 but all of the script mapping is not created automatically. I tried to use a alternative way to make it working as solution below.

1. The workaround I am using is to replace all of the script mapping back to the subdomain where is it not created by the subdomain.
2. Open IIS6, you shall see the hostname and right click then select the properties.

3. Check the checkbox of “Enable Direct Metabase Edit” and press OK.
4. Go to the directory of “C:\WINDOWS\system32\inetsrv”.
5. Backup the file named MetaBase.xml.
6. Open the file with notepad.
7. Find the domain name from the MetaBase.xml file.
8. Copy the line as below.



9. Find the subdomain.
10. Paste the copied line and replace the ScriptMaps.
11. Restart IIS.

Manually Reset IIS

Sometimes, when you reset the IIS (Internet Information Services), you might not able to fully start the services but getting the error that the service could not start in the time fashion.

Firstly you may try to restart the IIS from the command prompt as below,
iisreset /stop
iisreset /start

If the above command not working, try this
iisreset /stop
net start w3csvc
net start msftpsvc
net start smtpsvc

Prevent SQL injection by using IIS URL Rewrite

Nowadays, a bad or unoptimizes SQL query could easily compromised or get attacked. However you may try to reduce or prevent (Don’t say avoid, it is not possible, keke) the SQL injection through your expression rules.

If you are using IIS as your web engine, you may use some expression to reduce the SQL injection.


Continue reading Prevent SQL injection by using IIS URL Rewrite

Using ASP.Net MVC with different IIS

ASP.Net MVC is ASP.Net Modeling view controller where used to manage information and notify obeservers when that information changes.

To setting up ASP.Net MVC, you could setting it through IIS 6.0 or IIS 7.x.

  • IIS 7.x (integrated mode) – No special setting needed.
  • IIS 7.x (classic mode) – some setting needed to apply.
  • IIS 6.x or below – some setting needed to apply.

The setting needed as mentioned above actually is referring to creating the wildcard script map.

If you don’t want to use the URL mapping, you may actually ignore the setting as said, however if you want to use the mapping setting, you may refer as detail below.

IIS 7.0 with classic mode:

1.  Open IIS 7.0, select your application in the Connections window.
2. Make sure that the Features view is selected.
3. Double-click the Handler Mappings button.
4. Click the Add Wildcard Script Map link.

5. Enter the path to the aspnet_isapi.dll file (You can copy this path from the PageHandlerFactory script map)
6. Enter the name MVC.
7. Click the OK button.

IIS 6.0 or below:

1.  Right-click a website and select Properties.
2. Select the Home Directory tab.
3. Click the Configuration button.
4. Select the Mappings tab.
5. Click the Insert button.

6. Paste the path to the aspnet_isapi.dll into the Executable field (you can copy this path from the script map for .aspx files).
7. Uncheck the checkbox labeled Verify that file exists.
8. Click the OK button.

Not able to login to FrontPage Extension Admin Page

When you have IIS 6 with Frontpage extension 2002 and you have installed the FrontPage Extension 2002 to your IIS 6.0 and wish to check the FrontPage Extension Health and recalculate it but you failed to login (Keep on prompt the login page) to the Administrator page after hit on the Administrator page from the FrontPage manage page.

Firstly, please verify if you have used the correct login detail by typing the login password to a notepad at first. If you still failed to login and hit the cancel button where the page redirect you to a unauthenticated page, you may try with the solution as below where to disable the loopback checking.

Continue reading Not able to login to FrontPage Extension Admin Page