IIS Handlers exclude a Directory when processing htm requests

1.4k Views Asked by At

I am using the below handler in by web.config file. The problem i am now faced with is that i have .htm files in a particular directory that i need to be excluded from this handler. Is there a way to do this?

<add name="ASPNETLikeHandler-Classichtm" path="*.htm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" requireAccess="Script" preCondition="classicMode" />

So when a certain directory is targeted i want the .htm files to behave as they would by default. Is this even possible?

1

There are 1 best solutions below

1
On

Place a web.config file into the directory you want ignored and remove the handler

<system.webServer>
     <handlers>
       <remove name="ASPNETLikeHandler-Classichtm" />
     </handlers>
</system.webServer>