It seems normal and natural for a Microsoft IIS Webserver, which is set up to run ASP Classic code, to therefore process any .ASP file for code. That .ASP extension is the standard when it comes to running ASP pages.
However, what if you have existing pages all named .HTML? What if you want your HTML pages to now have ASP code in them, without changing their name from HTML to ASP?
You would do that by setting up a Handler Mapping.
In IIS, a handler mapping is how you tell the system to process each type of page. You could tell it to process files ending in .PHP with a PHP interpreter, files ending in .ASP with an ASP interpreter, and so on.
Here’s how you set up a new handler mapper so that your HTML files are now processed with the ASP interpreter.
Open up the IIS Manager on the server.
Click on your website on the list of websites on the left.
In the choice of main options on the right, choose the handler mapper.
You should already have a default entry in here for .ASP. If you do not have that ASP entry defined, you have bigger problems and need to fix those first.
Double click on the ASP entry to figure out what the executable is. Copy that into your clipboard.
Now choose to add a Module Mapping. That option is on the right.
Indicate that this applies to *.HTML files.
For module choose the same one as the existing ASP entry which should be ISASPModule.
For the executable, paste in the entry from the existing ASP entry. It’s probably something like %windir%\system32\inetsrv\asp.dll.
For the name, put in something like ASP Classic for HTML.
Save that. You should now be able to have your HTML pages contain usable ASP code in them.
Leave a Reply