3

I am running a PHP app using FastCGI and in the Handler Mappings I see the following:

           Name        |  Path |  State  |    Path Type   |                               Handler                         | Entry Type
    -------------------|-------|---------|----------------|---------------------------------------------------------------|-----------
    OPTIONSVerbHandler |   *   | Enabled |  Unspecified   |         ProtocolSupportModule                                 |   Local
    TRACEVerbHandler   |   *   | Enabled |  Unspecified   |         ProtocolSupportModule                                 |   Local
       StaticFile      |   *   | Enabled | File or Folder | StaticFileModule,DefaultDocumentModule,DirectoryListingModule |   Local

What are these 3? I did not configure the website initially. Can I remove these files from a specific website Handler Mappings?

  • 1
    you probably need StaticFile (its how things like images, javascript, and straight up HTML are handled). Options may be required depending on your tech stack. for instance I once had an app that implemented the CuteSoft editor so that users could edit some of the pages markup, and that required the options verb. we can't give you specific advise on it. – Frank Thomas May 16 '23 at 20:40

1 Answers1

3

What are OPTIONSVerbHandler, TRACEVerbHandler and StaticFile

They all define handlers for pages without URLs.

Source: IIS handler mappings

Can I remove these files from a specific website Handler Mappings?

Removing OPTIONSVerbHandler might cause a problem if you have CORS setup. Removing TRACEVerbHandler won't hurt anything, it will just disable tracing from working. And yes you want to remove TraceHandler-Integrated too, and TraceHandler-Integrated-4.0 as well in case it's installed on the server.

Source Does removal of "OPTIONSVerbHandler" and "TRACEVerbHandler" kill the website on iis?, answer by Rocklan

DavidPostill
  • 156,873
  • just one point, I'm not quite sure what you mean by "pages without urls". most handlers are selected by the file extension on the url (for instance .aspx, .asmx, .axd, etc have many handlers determined by the extension on the url), and allow the server to process serverside processes related to the application (eg the request pipeline). for extension-less url routing, a single special handler (ExtensionlessUrlHandler-Integrated-4.0) is used to defer handler mappings to the application framework routing (like MVC or whatever). – Frank Thomas May 16 '23 at 22:59