Friday, 23 July 2010

IIS7 handling HTML files as ASPX

Getting html files to be handled by the aspnet_isapi.dll is a bit of a pain in MSs new fandangled IIS7. So, for an app running in integrated mode on IIS7 do the following:

1. In the web.config under <system.webServer>, <handlers> add:
<add name="HTML-Integrated" path="*.html" type="System.Web.UI.PageHandlerFactory" verb="*">

2. Also in the web.config under <system.web>, <buildproviders> add:
<add name="HTML-Integrated" path="*.html, *.htm" verb="*" type="System.Web.UI.PageHandlerFactory" />

No comments:

Post a Comment