The Proper Way to Reinstall IIS 7.x
and WAS/WPAS
by vIISual.net(at)hotmail(dot)com
May 2010
Problem and Symptoms:
There
is a trick to reinstalling IIS7x that is not documented well presently and not
very intuitive. For those familiar with
IIS 6.0, it is natural to try to uninstall IIS 7.0 (or 7.5), reboot, and expect
it to reinstall fine. If it doesn’t, it
is somewhat natural, thinking still in terms of IIS 6.0, to go try to delete
the metabase.xml file, which for IIS 7.x translates mostly to the three config files stored at c:\windows\system32\inetsrv\config. At this point the IIS administrator sees the
IIS 7.x installation seem to hang for an extended period of time and then fail
with a very vague error message such as:
“installation failed”
and
“the server needs to be restarted to undo the changes.”
Unfortunately
there is no hint given at this point to check the c:\windows\iis7.log
file. If there were the relevant errors
would be:
< WARNING! > Failed to
detect if config redirection is enabled. result=0x80070490.Assuming config
is not redirected and continuing.
and
< !!FAIL!! > LaunchCommand result=0x80070002
Root cause:
The
WAS (Windows Activation Service or Windows Process Activation Service) needs to
be uninstalled after IIS is uninstalled to properly remove the config files IIS uses for storing metadata and to properly
remove IIS’ dependency on the old config files.
Solution:
Uninstall
IIS (from
server roles)
Uninstall
WAS/WPAS (from features)
Reboot
Install
IIS
Removing IIS from Windows 2008 R2. . .






(Reboot)

Note that the three config files were not deleted when IIS was installed.


Here I rename the three config files to sabotage the reinstall of IIS. . .

I like to rename the c:\windows\iis7.log file when
troubleshooting. . .

Reinstalling IIS. .
.



It begins to install based on this
view but doesn’t get very far.

The progress bar may get to 2/3rds of
the way done. . .

But then it just hangs there.
The IIS7.log file shows:
[05/22/2010 19:00:20] [ ***** IIS 7.0 Component Based Setup ***** ]
[05/22/2010 19:00:20] "C:\Windows\System32\inetsrv\iissetup.exe" /install CoreWebEngine
[05/22/2010 19:00:20] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070490.Assuming config is not redirected and continuing.
[05/22/2010 19:00:20] Install of component CoreWebEngine succeeded!
[05/22/2010 19:00:20] Success!
[05/22/2010 19:00:20] [ End of IIS 7.0 Component Based Setup ]
[05/22/2010 19:00:20] [ ***** IIS 7.0 Component Based Setup ***** ]
[05/22/2010 19:00:20] "C:\Windows\System32\inetsrv\iissetup.exe" /install W3SVC
[05/22/2010 19:00:20] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070490.Assuming config is not redirected and continuing.
[05/22/2010 19:00:20] < !!FAIL!! > Install of component W3SVC result=0x80070002
[05/22/2010 19:00:20] < !!FAIL!! > COMPONENT::ExecuteCommand result=0x80070002
[05/22/2010 19:00:20] [ End of IIS 7.0 Component Based Setup ]
[05/22/2010 19:00:21] [ ***** IIS 7.0 Component Based Setup ***** ]
[05/22/2010 19:00:21] "C:\Windows\System32\inetsrv\iissetup.exe" /launch C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.webServer/security/access
[05/22/2010 19:00:21] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070490.Assuming config is not redirected and continuing.
[05/22/2010 19:00:21] Launching command C:\Windows\System32\inetsrv\appcmd.exe, with params C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.webServer/security/access
[05/22/2010 19:00:21] < !!FAIL!! > LaunchCommand result=0x80070002
[05/22/2010 19:00:21] [ End of IIS 7.0 Component Based Setup ]
[05/22/2010 19:00:21] [ ***** IIS 7.0 Component Based Setup ***** ]
[05/22/2010 19:00:21] "C:\Windows\System32\inetsrv\iissetup.exe" /launch C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.webServer/handlers
[05/22/2010 19:00:21] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070490.Assuming config is not redirected and continuing.
[05/22/2010 19:00:21] Launching command C:\Windows\System32\inetsrv\appcmd.exe, with params C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.webServer/handlers
[05/22/2010 19:00:21] < !!FAIL!! > LaunchCommand result=0x80070002
[05/22/2010 19:00:21] [ End of IIS 7.0 Component Based Setup ]
[05/22/2010 19:00:21] [ ***** IIS 7.0 Component Based Setup ***** ]
[05/22/2010 19:00:21] "C:\Windows\System32\inetsrv\iissetup.exe" /launch C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.webServer/httpCompression
[05/22/2010 19:00:21] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070490.Assuming config is not redirected and continuing.
[05/22/2010 19:00:21] Launching command C:\Windows\System32\inetsrv\appcmd.exe, with params C:\Windows\System32\inetsrv\appcmd.exe reset config -section:system.webServer/httpCompression
[05/22/2010 19:00:21] < !!FAIL!! > LaunchCommand result=0x80070002
[05/22/2010 19:00:21] [ End of IIS 7.0 Component Based Setup ]
[05/22/2010 19:00:38] [ ***** IIS 7.0 Component Based Setup ***** ]
[05/22/2010 19:00:38] "C:\Windows\System32\inetsrv\iissetup.exe" /install Metabase
[05/22/2010 19:00:38] < WARNING! > Failed to detect if config redirection is enabled. result=0x80070490.Assuming config is not redirected and continuing.
[05/22/2010 19:00:38] Successfully updated IIS_IUSRS rights.
[05/22/2010 19:00:38] Successfully populated IIS_IUSRS.
[05/22/2010 19:00:38] Successfully set IISADMIN install state.
[05/22/2010 19:00:38] Successfully removed old metabase files.
[05/22/2010 19:00:40] Successfully started IISADMIN.
[05/22/2010 19:00:40] < !!FAIL!! > METABASE_UTIL::InstallIisAdminMetabaseEntries result=0x80070002
[05/22/2010 19:00:46] Successfully stopped IISADMIN.
[05/22/2010 19:00:46] < WARNING! > METABASE_UTIL::InstallLegacySnapInMetabaseEntries result=0x80070002
[05/22/2010 19:00:46] Successfully started IISADMIN.
[05/22/2010 19:00:46] < !!FAIL!! > Install of component Metabase result=0x80070002
[05/22/2010 19:00:46] < !!FAIL!! > COMPONENT::ExecuteCommand result=0x80070002
[05/22/2010 19:00:46] [ End of IIS 7.0 Component Based Setup ]
[05/22/2010 19:00:46] [ ***** IIS 7.0 Component Based Setup ***** ]
I renamed the three config files while it was hung. . .

Vague failure message:

Forced to restart before can reinstall
was
Back to “Remove features”

The way to uninstall WAS, or the
Windows Process Activation Service. . .








Note how the config
folder and its files are now totally gone. . .




This time the IIS 7.x install proceeds
fine.

http://technet.microsoft.com/en-us/library/cc735229(WS.10).aspx
IIS Windows Process
Activation Service (WAS)
Updated: January 20, 2010
Applies To: Windows Server 2008
Windows Process Activation Service (WAS) manages application pool
configuration and the creation and lifetime of worker processes for HTTP and
other protocols. The World Wide Web Publishing Service (W3SVC) and other
services depend on WAS.
http://support.microsoft.com/kb/930911
The Windows Process Activation Service
feature is not turned off when you turn off the IIS 7.0 feature