MBSchema.bin.00000000h Corruption caused IIS6 Admin Service failed on starting

Recently I faced one IIS Admin starting failure issue. When customer tried start IIS Admin Service, the service was pending on starting, and then failed. If we check the event log, we will see:

Event Type: Error
Event Source: Application Error
Event Category: (100)
Event ID: 1000
Date: 3/31/2012
Time: 6:48:46 PM
User: N/A
Computer: MachineName

Description:
Faulting application inetinfo.exe, version 6.0.3790.3959, faulting module msvcrt.dll, version 7.0.3790.3959, fault address 0x0003765f.

Usually this kind of error is caused by corrupted Metabase.xml or MSSchema.xml in C:\WINDOWS\system32\inetsrv, after restoring backup files from C:\WINDOWS\system32\inetsrv\MetaBack on a known good time point, the issue persists.

After collecting Crash dump when start IIS Admin Service (inetinfo.exe) and investigating the memory dump, we found the this crash call stack:

0:003> kL
ChildEBP RetAddr 
009bf928 6ee4192a msvcrt!_wcsicmp+0x32
009bf944 6ee472a1 iiscfg!FixedTableHeap::FindTableMetaRow+0x2d
009bf960 6ee486de iiscfg!CSDTFxd::GetTableMetaTable+0x18
009bf980 6ee2b992 iiscfg!CSDTFxd::Intercept+0x12c
009bf9c4 6ee2c2ae iiscfg!CSimpleTableDispenser::HardCodedIntercept+0x59
009bfa00 620cd4b7 iiscfg!CSimpleTableDispenser::GetTable+0x1f7
009bfae4 620ce9a7 metadata!CWriterGlobalHelper::InitializeGlobals+0x183
009bfafc 620b6373 metadata!GetGlobalHelper+0x66
009bfb0c 620c8c2e metadata!InitializeGlobalISTHelper+0x12
009bfb30 620c8f97 metadata!CompileIfNeeded+0x146
009bfc30 620c99f6 metadata!ReadAllDataFromXML+0x17d
009bfc48 620c9d71 metadata!ReadAllData+0x16
009bfc78 620bb3e3 metadata!InitWorker+0x35d
009bfc90 56f98719 metadata!CMDCOM::ComMDInitialize+0x18
009bfd44 649f2528 coadmin!InitComAdmindata+0x209

From the internal data structure used by iiscfg!CSDTFxd::GetTableMetaTable, it turns to be the fact that the crash occurs when reading "C:\WINDOWS\system32\inetsrv\MBSchema.bin.00000000h", which was highly suspected corrupted before.

To resolve this issue, we did below steps:

1. Disable IIS Admin Service first
2. Remove the corrupted "C:\WINDOWS\system32\inetsrv\MBSchema.bin.00000000h" file
3. Rrestore the pair schema and metabase files in the Metaback folder of c:\windows\system32\inetsrv\
4. Enable IIS Admin Service, and start it, the problem got resolved and the MBSchema.bin.00000000h will also be re-created.

Regards,

Freist Li from APGC DSI Team