With Windows Server 2008 and IIS 7 Microsoft introduced a new configuration system for the web-server, replacing the old metabase.xml used as an in memory configuration store by IIS 6. I will not go into the reasons for this change in this blog post, I would like to take you through some parts of the configuration system that are still using the metabase.xml as they did in IIS 6.
Config store architecture and what was left out:
In the IIS 6 version of the Microsoft web-server, the IIS Admin service, which was hosted in the inetinfo.exe process, was responsible for loading the contents of the IIS metabase into memory and decrypting it each time the server would start. In IIS 7 and IIS 7.5, the entire server configuration is stored in the applicationHosts.config file (found in %windir%\system32\inetsrv\config\) and in web.config files found in the various sites hosted on the server. As a side note, when installing a new IIS 7 or IIS 7.5 server all the configuration settings will be stored in the applicationHosts.config file by default.
The new Windows Process Activation Service (or WAS for short) reads the configuration needed to declare the application pools and hook up the different protocol bindings to the different sites and virtual directories. The rest of the configuration is read when and if needed directly by the worker processes themselves as well as the different IIS modules inside the worker process – section by section either from the applicationHosts.config or the web.config files. Hence on a typical IIS 7 server, you will no longer find the IIS Admin service or the InetInfo.exe process running any more, simply because they are no longer needed, since the functionality it provided is obsolete.
SMTP Service Configuration:
IIS 6 also came with an SMTP service (Simple Mail Transport Protocol) that allowed IIS to relay emails from one server to another. This was (as is still) used principally by Exchange Server, but it is not uncommon to have a standalone IIS server that is configured for SMTP relay.
The SMTP service has a couple of parameters that can be configured. Most interesting is the use of so called ESMTP verbs – actions that can be used when communicating between to SMTP servers. When opening a connection to an SMTP server, the server would advertise the actions it supports:
220 server.domain.com Microsoft ESMTP MAIL Service, Version:
5.0.2195.1 ready at Wed, 15 Mar 2000 17:37:07 -0800
220 server.domain.com Microsoft ESMTP MAIL Service [5.0.2195.1]
250-X-EXPS GSSAPI NTLM LOGIN
250-AUTH GSSAPI NTLM LOGIN
The following Knowledge Base article (KB 257569) explains how one can go about restraining the list of verbs that are acceptable to the SMTP server when using SMTP with IIS 6. There are two ways in which the SMTP service can be configured:
If you have an Exchange server running on the same box, you should use the Microsoft Exchange Metabase Update service (listed as MSExchangeMU), since this service would synch the settings of the SMTP service with the Active Directory settings every 15 minutes. Hence, parametric modifications you would try to do locally on the IIS metabase would be overwritten when the service synched with Active Directory. This still holds true even today, when using IIS 7 or IIS 7.5 web-servers.
If you installed the SMTP service on a standalone IIS box, you would have to configure the IIS metabase – several configuration options were also available via the IIS Administration Console, but not all.
In IIS 7 or IIS 7.5 it is important to know that the SMTP service settings have not been moved to the new configuration system. Hence when you install the SMTP service on an IIS 7 or IIS 7.5 server, a few optional components from the IIS Web Server role will also be installed automatically: the IIS 6 metabase compatibility and IIS 6 management console. This is because the SMTP service will still rely on the IIS metabase to configure itself.
Once the IIS 6 metabase compatibility and management console are installed, you will have access to the IIS 6 management console, from which you should be able to administer the SMTP service as you would have done on an IIS 6 server. For the ESMTP verbs, you can use such tools as the Metabase Explorer (which you can download from here) and the follow the instructions in KB 257569 to modify the settings.
Hence, to remove the 8bitmime action from the list of advertised actions for the SMTP service in IIS 7 or IIS 7.5 on the Default Web Site, you would open Metabase Explorer, navigate to the Lm/Smtpsvc/1LM key in the IIS metabase, and then modify the value of the SmtpInboundCommandSupportOptions key. To remove 8bitmime you would have to change the value from its default of 7697601 and subtract the value of the 8bitmime action value (which is 4194304 – according to the same KB article). Hence you would have 7697601 – 4194304 = 3503297 as a new value for the SmtpInboundCommandSupportOptions.
As a side note, when you have an Exchange server installed on the box that is hosting the SMTP service with IIS, the IIS 6 management console will show that the SMTP site is stopped, since this is managed by Exchange, and you will need to use the Microsoft Exchange Metabase Update service (as explained in point 1) to configure SMTP.
You should also not confuse the SMTP service settings (that are stored in the metabase) with the SMTP E-Mail settings that you have in the IIS 7 managed console – these are used to configure email delivery settings for Microsoft ASP.net applications and have nothing to do with the SMTP service.
by Paul Cociuba – ASP.net Engineer
Follow what I read via Linqto.me