Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


January 2001

Getting to Know the Metabase

RSS
Subscribe to Windows Web Solutions | See More Active Directory Service Interfaces (ADSI) Articles Here | Reprints
Or get the Monthly Online Pass—only $5.95 a month!
SideBar    ISM and the MMC Internet Information Services Snap-in

The IIS metabase

The IIS metabase plays a major role in your Web server's configuration. However, since Microsoft introduced the metabase in IIS 4.0, little in-depth information has been available about what goes on inside metabase.bin. In this issue, I introduce you to the IIS metabase, then explain what it stores and how to edit and customize its settings.

The metabase is a hierarchical database that stores IIS configuration values. With the introduction of the metabase, Microsoft transferred the most IIS-related settings from the registry to the metabase and added many more settings that allow greater customization. Microsoft made this change in part to let the system take advantage of features that the registry doesn't support. For example, because the metabase contains only settings related to IIS, it's physically smaller than the registry. This smaller size lets the system maintain a copy of the metabase in memory for faster access.

Another improvement is that the metabase supports a Lightweight Directory Access Protocol (LDAP) interface. LDAP is a set of standard interfaces that Active Directory Service Interfaces (ADSI) supports. ADSI uses a set of common objects and interfaces to access directories and other hierarchical data structures. Some might say that just having a standards-based interface rather than the registry access functions is a big improvement; however, the real plus is that ADSI lets you build utilities that let you access and edit the metabase remotely. But before I get into the details of editing, let's review how to protect your metabase.

Protecting Your Metabase
One of the worst things that can happen to IIS is the destruction or corruption of the metabase. Therefore, you need to know how to back up your metabase. To begin the backup process, open Internet Services Manager (ISM). Beneath Internet Information Services, right-click your computer name, then select Backup/Restore Configuration. On the Configuration Backup/Restore dialog box, which Figure 1, page 2, shows, click Create backup. Provide a short but meaningful name for your backup. When you click OK, the system will create the backup file in the \system32\inetsrv\metaback directory.

The second way to protect your metabase is to hide it. When you hide the metabase, you protect it from anyone who might gain unrestricted file-level access to your system. I recommend renaming your metabase something less tempting than the default metabase.bin. After all, how interesting does recipes.imb look in the \my documents\recipes directory? The IIS installation process creates metabase.bin in your \system32\inetsrv directory. Moving the metabase requires you to restart IIS either before renaming or after creating a copy of the metabase.

Use the registry to tell IIS the new name and location of the metabase. (Always back up the registry before making changes.) Open a registry editing tool, and add the MetadataFile (REG_SZ) value to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetMgr\Parameters subkey. This value must contain the full path, including drive letter and filename, to your relocated and renamed file. Also, don't forget to remove or replace your original metabase file and move the backup copy you created.

Accessing Metabase Settings
You can use several methods to edit the metabase. Those methods include

  • The ISM/Microsoft Management Console (MMC) Internet Information Services snap-in (For an explanation of the distinction between ISM and the MMC snap-in, see the Web-exclusive sidebar "ISM and the MMC Internet Information Services Snap-in.")
  • The MMC Microsoft Site Server Configuration Console snap-in
  • Command-line command execution
  • Programming interfaces (i.e., IMSAdminBase and ADSI-GetObject)
  • MetaEdit

The MMC snap-ins are application components that allow limited access to the metabase. Notice the two programming interfaces that are available. The first programming interface is the IIS Admin Base Object (IMSAdminBase), which is Active Template Library (ATL) compatible. IMSAdminBase is ideal for retrieving data from the metabase. However, because IMSAdminBase isn't an ADSI-based interface, carefully consider any decision to create a custom metabase property. (Creating custom properties is an involved process and beyond the scope of this article.) More information about the IMSAdminBase interface is available from the Microsoft Developer Network (MSDN) Online Library (http://msdn.microsoft.com/library/ default.asp?url=/library/psdk/iisref/abre6bol.htm).

The second programmatic interface is ADSI-GetObject. This interface works well for accessing most objects (keys) and values (properties) that make up the metabase. Unfortunately, the ADSI interface has limitations. For example, some entries created with the IMSAdminBase interface aren't ADSI compatible. In addition, installing Site Server or Microsoft Commerce Server 2000 adds several properties that the ADSI interface has trouble setting and retrieving.

An example of where you can use the ADSI objects is in the command-line interface to the metabase. This interface is a set of script files that exists in the \inetpub\adminscripts directory in Windows 2000 and in the \system32\inetsrv\adminscripts directory in Windows NT 4.0. The most generic of these scripts is adsutil.vbs. Microsoft articles often reference this script when you need to check or modify a specific metabase setting that isn't available from ISM.

   Previous  [1]  2  Next 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Remote Control Software

Control remote machines from home or the office. ...

WinInfo Short Takes: Week of July 21, 2008

An often irreverent look at some of the week's other news, including an iPhone 3G defeat, 180 million copies of Windows Vista in the wild, Microsoft earnings some more Yahoo silliness, Wii vs. Xbox 360, EU vs. Intel, AMD ousts its CEO, and so much more ...


IIS and Web Administration Whitepapers The Five Secrets to Controlling Your SharePoint Environment

Extended Validation SSL Certificates

Related Events Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Shortcut Guide to SQL Server Infrastructure Optimization
With right tools and techniques, you can have a top-performing SQL Server infrastructure without having to cram your data centers so that they're overflowing. Download this eBook to learn how.

WinConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

Become a fan of Windows IT Pro on Facebook!
Join us on Facebook and be a fan of Windows IT Pro!

Continuous Data Protection and Recovery for Exchange
Read this white paper to learn about Continuous Data Protection (CDP), Exchange 2007's local continuous replication and cluster continuous replication features.

Rev Up Your IT Know-How with Our Recharged Magazine!
The improved Windows IT Pro provides trusted IT content with an enhanced new look and functionality! Get comprehensive coverage of industry topics, expert advice, and real-world solutions—PLUS access to over 10,000 articles online. Order today!

Tips to Managing Messaging
Discover three fundamental mail and messaging management services - security, availability and control services - and how you can implement them in a Microsoft-centric mail and messaging environment.

Get It All with Windows IT Pro VIP
Stock your IT toolbox with every solution ever printed in Windows IT Pro and SQL Server Magazine plus bonus Web-exclusive content on hot topics. Subscribe to receive the VIP CD and a subscription to your choice of Windows IT Pro or SQL Server Magazine!



Drag & Drop Data Mapping Tool
Try this award-winning data mapping, & transformation tool that supports multiple databases, flat files, Web services, EDI, Excel 2007, & more! Free trial for 30 days!

Overcome bloated Windows file systems
Crossroads FMA delivers powerful yet inexpensive data migration

Bandwidth Monitoring Tool from SolarWinds
Identify largest bandwidth users in seconds. Get the free download now.

Speed Deployment of Vista and Microsoft Office
Read this white paper to learn how you can maximize your Vista and Office investments while lowering costs and increasing efficiency.

Integrated Virtualization Done Right
Download this white paper on server virtualization to begin improving resource utilization and lowering operating costs.

Order Your Fundamentals CD Today!
Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.

KVM over IP Solutions
Learn about a KVM over IP solution that is specifically designed to meet the needs of the distributed IT environment.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound
IT Library Technical Resources Directory Connected Home Windows Excavator SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing