Tip / Trick: how to turn off "verify file exists" in IIS7

I've seen several posts asking the question:  how do I turn off the "verify file exists" setting on handlers / script maps in IIS7.  I must admit, this seems to not be as  straightforward as it should be.  Hopefully this post helps you out.

The configuration setting for this feature is stored in the <handlers> section for each handler mapping, and is known as the resourceType attribute.  For example:

<add name="ASPClassic" path="*.asp" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" />

For the ASP script map, we set resourceType="File" by default, so that the ASP engine won't get invoked for requests that are not mapped to real files.  If you want your handler to be invoked for requests, even if there is no file or directory behind the request, set the resourceType="Unspecified".  The allowable values for resourceType are "File", "Directory", "Either", or "Unspecified". 

 

You can set this value in the administration tool by doing the following:

Step 1 - double click on handler mapping in the <handlers> feature:

Step 2: uncheck checkbox to set the handler to 'unspecified':

 

hope this makes life a little easier. ;)

No Comments