IIS 7.0 Manager Customization and Extensibility
IIS Manager is not
just an application, but rather an extensible platform that developers
can use to plug in their own features to manage custom settings and
applications. Developers can change the UI, remove existing features,
and add new administration features.
IIS 7.0 ships with an
application programming interface (API) that enables developers to
change the IIS Manager UI and to manage custom settings and applications
on the server. For example, this API provides the extensibility
mechanism to develop UI features represented as list pages, property
grids, and dialog pages; a custom-designed Actions pane; wizards and
dialog boxes; and the ability to add custom nodes to the Connections
pane.
IIS Manager is designed to have distributed
client-server architecture. In addition, IIS Manager has a modular
infrastructure in which every UI feature is its own entity. Each feature
follows the client-server paradigm. This architecture of IIS Manager
separates the logic that manipulates server settings from the
presentation code, which displays these settings in a user-friendly
manner for each of the UI features.
Each IIS Manager feature has two components:
This architecture is illustrated in Figure 1. IIS Manager extensions must follow this architecture that is enforced by the base classes provided within the API.
The first step to deploy the new IIS
extension is to install its client and server components in the global
assembly cache (GAC) on the server. The second step is to register the
new extension with IIS Manager. Each extension has to be individually
registered with IIS Manager. IIS Manager is built on top of
configuration system extensibility that enables custom functionality to
be easily added.
IIS Manager uses a special file called
administration.config that defines IIS Manager configuration. The
administration.config file is located on the server in the folder %SystemRoot%\System32\Inetsrv\Config.
Administration.config is an XML configuration file that includes a list
of IIS Manager built-in features and extensions. On IIS Manager
startup, this file is checked to determine what features should be
displayed in IIS Manager. If IIS Manager is connecting remotely, then
the Web Management Service compares the module providers available on
the server with the module providers available on the client. If a new
extension is available on the server, the client is prompted to download
and install that extension.
The <moduleProviders>
section in the administration.config file defines all IIS Manager
extensions that are registered on the system. To register an extension,
you need to add the fully qualified type name of that extension module
provider to the <moduleProviders> section and add the module name to the <modules> section. Depending on the desired extension scope, you may need to add the corresponding module name to the appropriate <location path>
section that will define the sites and applications where this
extension will appear in IIS Manager. The following excerpt from the
administration.config file shows a built-in module provider for the
DefaultDocument module in the <moduleProviders> section and the module DefaultDocument in the <modules> section with the root location path of "." that makes it available to all sites and applications on the server.
<moduleProviders>
<!-- Server Modules-->
<add name="DefaultDocument"
type="Microsoft.Web.Management.Iis.DefaultDocument
DefaultDocumentModuleProvider, Microsoft.Web.Management.Iis,
Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</moduleProviders>
<!-- For all Sites -->
<location path=".">
<modules>
<add name="DefaultDocument" />
...
</modules>
</location>
After
you’ve registered the extension, on the next IIS Manager startup, the
client will be prompted to download and install the client component of
that extension.
Remote Administration
In IIS Manager, remote connections are not
available by default. To manage IIS 7.0 running on Windows Server 2008
remotely, you need to set up the client machines and configure the
server for remote administration.
To administer IIS 7.0 running on Windows
Server 2008 remotely from client machines running Windows Vista Service
Pack 1 (SP1), Windows Server 2003 SP1, and Windows XP SP2, you need to
install IIS Manager on these client machines and then connect to sites
and applications on the server you need to manage. You can download IIS
Manager for these operating systems from http://iis.net/downloads.
On the server, you must explicitly
enable remote management of IIS 7.0 through IIS Manager. This is
different than IIS 6.0, where management console remoting was through
the MMC and was always enabled. For remote administration of IIS 7.0,
Web Management Service (WMSvc) must be installed and running on the
server, and remote connections to the service must be enabled.
Web Management Service is not installed
by default—you need to install Web Management Service manually. During
installation, you can specify the IP address and port number the service
will listen on or accept the defaults: All Unassigned for the IP
address, and 8172 for the port number.
After you have installed Web Management
Service, the Management Service Feature appears on the home page for the
server in IIS Manager, and you can configure this feature to enable
remote connections to service.
To enable remote connections, perform the following steps in IIS:
-
Select the server node in the Connections pane. The server home page is displayed.
-
Double-click the Management Service feature to open the Management Service feature page.
-
In the Management Service feature page, in the Actions pane, click Stop to stop the service.
-
Check the Enable Remote Connections
check box. Doing so enables server administrators to connect remotely to
the server, as well as to sites and applications.
Note
The setting that enables remoting is stored in the dword registry value EnableRemoteManagement under the registry key HKLM\SOFTWARE\Microsoft\WebManagement\Server.
-
If you would like
users without administrative privileges to manage sites and applications
on this server, choose the type of identity credentials for these
users. Configure other settings if needed, such as connections and
logging options and IPv4 and domain restrictions. Click Apply in the
Actions pane to save the changes and then click Start to start the
service.