6

I have a fresh install of IIS 7, and under the Handler Mappings, I see a section for Disabled mappings and a section for Enabled. I want to disable a bunch of extensions (cshtml, aspq, etc). That is, I want to "move" them from the Enabled section to the Disabled section without deleting them. How do I do this?

(EDIT: Oops. It's IIS 7, not 7.5.)

anon
  • 404
  • 1
  • 5
  • 15

3 Answers3

6

You can not disable individual handler mappings in the UI. The 'Edit Feature Permissions' mentioned by Mark Henderson applies to the whole feature 'Handler Mappings', so it applies to all mappings, not a single one.

There are really three groups of handlers, one that requires Execute permission such as, 'ISAPI-dll' or 'CGI-exe', the second group that requires 'Script' permissions, all the asp.net handlers are in that group. The third group of handlers only requires 'Read' permission, 'StaticFile' is an example of this. Because it does not execute a process nor does it run a script, it just reads a file from the file system.

You can check this by open 'Edit Feature Permissions' and uncheck 'Script', most of the mappings are now disabled. Uncheck 'Read' and the last few enabled ones are disabled as well.

To remove a handler from a site, open the web.config and add something like this:

<system.webServer>
    <handlers>
      <remove name="PageHandlerFactory-Integrated-4.0"/>
    </handlers>
</system.webServer>  

This will remove the integrate ASP.NET 4 page handler, which means web forms (aspx) will no longer work.

If you look at the 'Handler Mappings' for the same site in IIS Manager, that mapping still shows up in the enabled section, even though it does no longer work for the site.

Peter Hahndorf
  • 13,763
  • 3
  • 37
  • 58
0

just uncheck the execute checkbox, that moves it to disabled section in our case, solved the connect computer wizard not working on SBS 2011.

0

My problem wasn't any of the other answers listed here. At some point the "StaticFile" handler mapping had been disabled. In order to re-enable this:

  • Go to the top level of the server you're managing
  • Go to Handler Mappings
  • Click StaticFile and then click Edit Feature Permissions... in the right panel.
  • Make sure the Read checkbox is checked.
AndrewPK
  • 303
  • 1
  • 7