How to map .html to asp.dll (IIS7 & IIS 7.5)

There is some bug on IIS 7.5 where the setting on IIS handler mapping not able to function well when it need to edit the existing hander to  use other executable module.  It not a known bug but it do happen based on my testing.

IIS7.5

But we can try do the setting on backend.

CAUTION: Make Sure you have backup all the copy of the file that you edit.

1) go into the C:\Windows\System32\inetsrv\config directory and edit the fileapplicationHost.config (you will need to do this in administrator mode, or do it from a different computer networking over to that server, otherwise Windows will protect that file and won’t allow you to change it.)

2) Scroll all the way to the bottom and look for the section that corresponds to your web site <location path=”Your Web Site”>

3) Change/edit the code block to add in the HANDLERS and HTM map below

<location path="Your Web Site"> 
<system.webServer>
<asp appAllowClientDebug="true" scriptErrorSentToBrowser="true" /> 
<handlers> 
<add name="htm" path="*.htm" verb="*" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" /> 
</handlers> 
</system.webServer> 
</location>

4) Save it and restart IIS. Bingo.

Leave a Reply

Your email address will not be published. Required fields are marked *