How to compare two IIS servers and find what differs

A site works on one server and fails on its twin, and everyone swears the servers are identical. IIS settings live in several places, so the difference is often in one you did not compare. This guide walks through what to compare and in what order, using Microsoft's own documentation.

Pick a baseline and write down the scope

Choose the server that behaves correctly as the baseline, and list the servers you compare against it. Write down what you will compare before you start, so you do not stop at the first difference you find.

A Microsoft engineer's article on this problem describes the common causes: an IIS module installed on one server and not the other, or an application pool setting that differs between pre-production and production. Keep those two in mind as the first things to check.

  • Server names, roles and the reason each pair should match.
  • The date of the last known good state.
  • Who owns each server and who can approve a change.
  • Where you will store the comparison results.

Steps 1 and 2: Compare IIS and application configuration files

On IIS 7 and later, applicationHost.config is the root file of the configuration system. It includes definitions of all sites, applications, virtual directories and application pools, plus global defaults for the web server settings. Microsoft documents its location as the system32\inetsrv\config folder, and advises making a backup before any change.

The method in the Microsoft article is simple: copy the file from the baseline server and from each other server, rename each copy with the computer name, and open them in a file comparison tool. It is a quick way to see IIS-level differences. It will not show settings stored in the web.config files of individual applications, and it will not show differences in application files.

Settings can also sit in a web.config file in each site or application folder. Compare those files the same way, preferably with a tool that can compare whole folders. This is where application-level differences hide, because the main file will not show them.

Step 3: Compare installed IIS features

The Microsoft article points out that synchronizing site content and configuration does not synchronize IIS features and installed components. For example, ASP.NET or Windows authentication has to be installed separately on each server. Open the list of installed roles and features on each server and compare the lists. A missing module is one of the most common reasons for a server that behaves differently with the same configuration file.

Beyond IIS, compare the rest of the Windows layer in the same way: services and their startup types, scheduled tasks, certificates, local groups, installed updates and the installed .NET runtimes. These are not covered by the IIS files above, and they are frequent causes of a farm node that behaves differently. Keep the lists in one spreadsheet with one column per server so a difference is visible at a glance.

  • Installed Windows features and IIS role services.
  • Services: name, startup type and run-as account.
  • Certificates: subject, expiry date and which site binds them.
  • Scheduled tasks and the accounts they run under.
  • Installed updates and .NET runtimes.

Step 4: Use the deeper tools for a second opinion

The same article describes Web Deploy for a deeper comparison of IIS settings and web application content, including a mode that reports what would change without changing anything. It notes that the method will not show missing dependency files or wrong .NET Framework versions. Read the article for the exact commands, which are written for IIS servers of that era, and test them on a non-production pair first.

Step 5: Decide how often to check

Run the comparison after every change window and before any release to a farm. If two servers in a farm must always match, consider the IIS shared configuration feature. Microsoft documents that it stores applicationHost.config on a remote share to reduce replication and synchronization problems. It does not cover machine.config, the root web.config, the web.config files of sites, website content, custom modules or the list of installed modules, so you still compare those by hand.

Write the result of each check down, even when there is no difference. A dated note saying that two servers matched on a given day is useful the next time something changes, because it narrows the window in which the difference appeared.

Treat a difference as a question, not a verdict. Some differences are intended, such as a certificate that is specific to one node. Mark each one as expected or unexpected, fix the unexpected ones through your normal change process one at a time, and check again after each change.

Where ServerParity fits

ServerParity is coming soon. It is planned to collect installed features, services, IIS sites and application pools, certificates, scheduled tasks, local groups, hotfixes and .NET runtimes from the servers you pick, show the differences side by side and keep a history. We have not set a date; join the list and we email you at launch.

Sources

Coming soon: ServerParity

Compare Windows and IIS servers that should match. ServerParity compares two or more servers that are supposed to be identical, such as web farm nodes or a disaster-recovery pair, and shows a side-by-side list of what differs. It is a sibling of SQLParity for the Windows and website layer, for IT teams with several servers that should match.

About ServerParityPrice comparison

Get ServerParity first

Join the list and get 25% off your first purchase when it goes on sale. We email you a discount code on launch day. One code per person, for new customers.

One email when it launches (plus the discount code). No other mail, and you can say stop at any time. See our privacy policy.

An unhandled error has occurred. 🗙