Managing Handler Inheritance
inheritance feature of handler mapping settings can simplify the
administration of servers significantly that host many Web sites and
Web applications. In general, configure handler mappings at the highest
applicable level. For example, if you are sure that none of the Web
applications in a specific Web site will need to respond to the .soap
file extension, you can remove this handler mapping at the level of the
Web site. As mentioned earlier, to increase security, minimize the
numbers and types of handlers that are enabled.
default, it is possible for lower-level objects on the Web server to
override handler mapping settings from parent objects. In some cases,
you might want to prevent some types of requests from being processed
on the entire server, regardless of settings for Web sites and Web
applications. You do this by locking the configuration of the request
handler. To lock the configuration, click the Web server object in IIS
Manager, and then double-click Handler Mappings. Select the handler
mapping you wish to lock, and then click the Lock command in the Actions pane.
It is also possible to restore the handler mappings settings to their default values. To do this, click the Revert To Inherited command in the Actions pane in IIS Manager. Performing this action
will restore mappings from the parent object, but it will also result
in the loss of any locally defined handler mappings.
Adding Handler Mappings
architecture of IIS enables systems administrators to add new handler
mappings based on specific needs. For example, if you want to provide
support for a type of file that has a .mypage extension, you can add a
handler for this path type. Additionally, Web developers can create
their own programs to manage new types of requests.
add a handler mapping, select the appropriate object, and then
double-click Handler Mappings in the Features View in IIS Manager. The
Actions pane contains several options for adding new types of request
handlers. They are:
Add Managed Handler
A managed handler processes requests based on a .NET-based code
library. The Type setting enables you to choose from the existing .NET
code modules registered on the local server, as shown in Figure 15. These types of options all belong to the System.Web namespace.
Figure 15. Adding a manager handler for a Web site
Add Script Map
Scripting mappings are used to send request processing to a Dynamic
Link Library (DLL) or executable (.exe) file type. These types of
programs are designed to process request information and generate a
response for IIS to send back to the end user.
Add Wildcard Script Map
Wildcard script mappings are used to specify a default handler for
types of documents that are not managed by other handlers. The
Executable path option points to either a .dll or an .exe file designed
to handle requests.
Add Module Mapping Modules
are programs designed to integrate with the IIS request processing
pipeline. They can provide a wide range of functions and are included
with the default and optional role services that are part of the Web
Server (IIS) role. Examples include the FastCGIModule, for processing scripts based on the Common Gateway Interface (CGI) specification, and StaticCompressionModule,
which compresses static HTML content to reduce bandwidth usage. In
addition to specifying the module that will be used for processing,
administrators can define an optional executable or .dll file that will
be used when processing requests, as shown in Figure 16.
Figure 16. Adding a module mapping to a Web application
you add a new request handler, you will be prompted to provide
information about the request path. You can use wildcards, or you can
specify a list of specific files. Examples include *.mypage (for
responding to a request for any file with this extension) and
Config.mypage (for responding to requests for this specific filename).
You use the Name setting to help other developers and administrators
identify the purpose of the handler mapping.