<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Sunday Morning Musings on IIS : Metabase</title><link>http://blogs.iis.net/lprete/archive/tags/Metabase/default.aspx</link><description>Tags: Metabase</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Cannot Select an Application Pool in IIS 6.0 "Invalid Application Pool" message</title><link>http://blogs.iis.net/lprete/archive/2008/06/22/cannot-select-an-application-pool-in-iis-6-0-quot-invalid-application-pool-quot-message.aspx</link><pubDate>Sun, 22 Jun 2008 18:48:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2444051</guid><dc:creator>lprete</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/lprete/rsscomments.aspx?PostID=2444051</wfw:commentRss><comments>http://blogs.iis.net/lprete/archive/2008/06/22/cannot-select-an-application-pool-in-iis-6-0-quot-invalid-application-pool-quot-message.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Problem Description&lt;/H1&gt;
&lt;P&gt;When trying to configure an Application Pool for a web site or web Application you see &lt;STRONG&gt;&amp;lt;Invalid Application Pool&amp;gt;&lt;/STRONG&gt; in the Application Pool field on the Home Directory tab of the properties of the Site or Virtual directory. There may be other application pools to select or there may not. &lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=471 alt=image src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_3.png" width=487 border=0 mce_src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_3.png"&gt; &lt;/P&gt;
&lt;P&gt;There are no errors in the system event log.&lt;/P&gt;
&lt;H1&gt;Cause&lt;/H1&gt;&lt;BR&gt;
&lt;P&gt;This problem occurs when the KeyType element is missing or contains an invalid &lt;BR&gt;string. &lt;A href="http://msdn2.microsoft.com/en-us/library/ms524547.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ms524547.aspx"&gt;A list of possible values for this element is available in MSDN.&lt;/A&gt; &lt;/P&gt;
&lt;H1&gt;Resolution&lt;/H1&gt;&lt;BR&gt;
&lt;H2&gt;Method #1&lt;/H2&gt;
&lt;P&gt;Use adsutil.vbs to identify the Application pool which does not show up in the MMC&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;Enumerate the application pools:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;
&lt;STYLE type=text/css&gt;


.style1 {
	background-color: #000000;
}
.style2 {
	color: #ffffff;
	font-family: "Courier New", courier, monospace;

}&lt;/STYLE&gt;

&lt;TABLE class=style1 style="WIDTH: 100%" cellPadding=2 class="style1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN class=style2&gt;C:\Inetpub\AdminScripts&amp;gt;&lt;STRONG&gt;adsutil.vbs enum /p w3svc/apppools&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;BR class=style2&gt;&lt;SPAN class=style2&gt;[/w3svc/apppools/DefaultAppPool]&lt;/SPAN&gt; &lt;BR class=style2&gt;&lt;SPAN class=style2&gt;[/w3svc/apppools/ASP.NET 1.1]&lt;/SPAN&gt; &lt;BR class=style2&gt;&lt;SPAN class=style2&gt;[/w3svc/apppools/ASP.NET 2.0]&lt;/SPAN&gt; &lt;BR class=style2&gt;&lt;SPAN class=style2&gt;[/w3svc/apppools/Broken App Pool]&lt;/SPAN&gt; &lt;BR class=style2&gt;&lt;SPAN class=style2&gt;[/w3svc/apppools/Kerberos]&lt;/SPAN&gt; &lt;BR class=style2&gt;&lt;BR class=style2&gt;&lt;SPAN class=style2&gt;C:\Inetpub\AdminScripts&amp;gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR&gt;Then get each app pool keytype, we are looking for one which either returns "&lt;STRONG&gt;&lt;EM&gt;The Parameter 'keytype' is not set at this node"&lt;/EM&gt;&lt;/STRONG&gt; or returns a string which is &lt;STRONG&gt;&lt;EM&gt;NOT "IIsApplicationPool"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;
&lt;STYLE type=text/css&gt;

.style1 {
	background-color: #000000;
}
.style2 {
	color: #ffffff;
	font-family: "Courier New", courier, monospace;

}&lt;/STYLE&gt;

&lt;TABLE class=style1 style="WIDTH: 100%" cellPadding=2 class="style1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;SPAN class=style2&gt;C:\Inetpub\AdminScripts&amp;gt;&lt;STRONG&gt;adsutil.vbs get "w3svc/apppools/Broken App Pool/keytype"&lt;/STRONG&gt; &lt;BR&gt;&lt;BR&gt;keytype&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : (STRING) "IIsApplicationPoolNOT" &lt;BR&gt;&lt;BR&gt;C:\Inetpub\AdminScripts&amp;gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR&gt;Once you have identified the invalid application pool you need to correct or add the value for keytype.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;
&lt;STYLE type=text/css&gt;

.style1 {
	background-color: #000000;
}
.style2 {
	color: #ffffff;
	font-family: "Courier New", courier, monospace;

}&lt;/STYLE&gt;

&lt;TABLE class=style1 style="WIDTH: 100%" cellPadding=2 class="style1"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=style2 class="style2"&gt;C:\Inetpub\AdminScripts&amp;gt;&lt;STRONG&gt;adsutil.vbs set "w3svc/apppools/Broken App Pool/keytype" IIsApplicationPool&lt;/STRONG&gt; &lt;BR&gt;keytype&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : (STRING) "IIsApplicationPool" &lt;BR&gt;&lt;BR&gt;C:\Inetpub\AdminScripts&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;H2&gt;Method #2&lt;/H2&gt;
&lt;P&gt;You can also use &lt;STRONG&gt;Metabase Explorer&lt;/STRONG&gt; to correct this issue. &lt;STRONG&gt;Metabase Explorer&lt;/STRONG&gt; is part of the &lt;STRONG&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&amp;amp;DisplayLang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&amp;amp;DisplayLang=en"&gt;IIS Resource Kit Tools&lt;/A&gt;. &lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open MB Explorer.&lt;/LI&gt;
&lt;LI&gt;Expand &lt;STRONG&gt;LM&amp;gt;W3SVC&amp;gt;AppPools&lt;/STRONG&gt;. &lt;BR&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=276 alt=image src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_6.png" width=191 border=0 mce_src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_6.png"&gt; &lt;/LI&gt;
&lt;LI&gt;Look for application pool which does not show up in IIS MMC or one missing or with an invalid string value. The only valid value at this location is "IIsApplicationPool". &lt;BR&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=90 alt=image src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_9.png" width=570 border=0 mce_src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_9.png"&gt; &lt;/LI&gt;
&lt;LI&gt;Add a Record called "KeyType" with a value of "IIsApplicationPool". &lt;BR&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=516 alt=image src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_12.png" width=382 border=0 mce_src="http://blogs.iis.net/blogs/lprete/WindowsLiveWriter/CannotSel.0InvalidApplicationPoolmessage_D01B/image_12.png"&gt; &lt;/LI&gt;
&lt;LI&gt;Close Metabase Explorer. &lt;/LI&gt;
&lt;LI&gt;Open IIS MMC and should be able to change application pool on web site/virtual directory now. &lt;/LI&gt;&lt;/OL&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2444051" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/lprete/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.iis.net/lprete/archive/tags/Metabase/default.aspx">Metabase</category></item><item><title>IIS6: Restoring Metabase Configuration to a New Server</title><link>http://blogs.iis.net/lprete/archive/2008/01/20/iis6-restoring-metabase-configuration-to-a-new-server.aspx</link><pubDate>Sun, 20 Jan 2008 17:15:59 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2143050</guid><dc:creator>lprete</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.iis.net/lprete/rsscomments.aspx?PostID=2143050</wfw:commentRss><comments>http://blogs.iis.net/lprete/archive/2008/01/20/iis6-restoring-metabase-configuration-to-a-new-server.aspx#comments</comments><description>&lt;p&gt;I get this call quite frequently. Three times this week.&lt;/p&gt;  &lt;h3&gt;&lt;strong&gt;The Scenario&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;There was some sort of catastrophe, a hard drive crashed, a power failure, something. After recovering the OS from this catastrophe IIS is not working - The &lt;strong&gt;IIS Admin&lt;/strong&gt; and/or the &lt;strong&gt;World Wide Web &lt;/strong&gt;Services simply will not start.&lt;/p&gt;  &lt;p&gt;This failure to start is accompanied by various errors in the System Event Log, the most common I have seen is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#ff0000" size="2"&gt;Event Type: Error        &lt;br /&gt;Event Source: &lt;/font&gt;&lt;a name="#h1"&gt;&lt;font face="Courier New" color="#ff0000" size="2"&gt;Service Control Manager&lt;/font&gt;&lt;/a&gt;       &lt;br /&gt;&lt;font face="Courier New" color="#ff0000" size="2"&gt;Event Category: None        &lt;br /&gt;Event ID: &lt;/font&gt;&lt;a name="#h2"&gt;&lt;font face="Courier New" color="#ff0000" size="2"&gt;7024&lt;/font&gt;&lt;/a&gt;       &lt;br /&gt;&lt;font face="Courier New" color="#ff0000" size="2"&gt;Description:        &lt;br /&gt;The IIS Admin Service service terminated with service-specific error 2148073478&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&lt;strong&gt;Some Explanation&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;Two things come into play here, MachineKeys &amp;amp; any encrypted keys in Metabase.XML. If IIS shut down abruptly one or more encrypted keys may not have been written out correctly into the Metabase.&amp;#160; If you went as far as reinstalling Windows then the MachineKeys of the new installation will not be able to decrypt the encrypted keys in the old Metabase. In either case when IIS tries to start the IIS Admin Service and uses a MachineKey under &lt;strong&gt;&lt;em&gt;C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys&lt;/em&gt;&lt;/strong&gt; to decrypt the encrypted keys in the Metabase (usually passwords). &lt;/p&gt;  &lt;p&gt;If this directory path is changed or the MachineKey itself changes,&amp;#160; or if the encrypted data was not written out correctly in the Metabase during the previous shut down, IIS will fail to start and will generate an error similar to the one listed above.&lt;/p&gt;  &lt;p&gt;The specific MachineKey will look similar to the following:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New" color="#ff0000" size="2"&gt;c2319c42033a5ca7f44e731bfd3fa2b5_e19f50ab-fae5-485a-8306-2d05ab2c91c0&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="tre" size="2"&gt;&lt;strong&gt;Note: &lt;/strong&gt;The first half of the MachineKey (up to the under-score &amp;quot;_&amp;quot;) refers to the service, in this case IIS, the remainder of the MachineKey is a hash specific to the installation.&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;&lt;strong&gt;Possible Solution&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;To recover Site configurations:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Rename old Metabase to &lt;a name="#h2"&gt;&lt;font color="#000000"&gt;SiteConfig&lt;/font&gt;&lt;/a&gt;.&lt;a name="#h3"&gt;&lt;font color="#000000"&gt;XML&lt;/font&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Delete all AdminACL keys and password keys from &lt;a name="#h4"&gt;&lt;font color="#000000"&gt;SiteConfig&lt;/font&gt;&lt;/a&gt;.&lt;a name="#h5"&gt;&lt;font color="#000000"&gt;XML&lt;/font&gt;&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;With a clean Metabase (reinstall IIS if necessary) verify that IIS Admin and W3SVC start &amp;amp; the Default (under construction) page is working.&lt;/li&gt;    &lt;li&gt;Open 'clean' Metabase.&lt;a name="#h6"&gt;&lt;font color="#000000"&gt;XML&lt;/font&gt;&lt;/a&gt; and copy the SessionKey value.&lt;/li&gt;    &lt;li&gt;Open &lt;a name="#h7"&gt;&lt;font color="#000000"&gt;SiteConfig&lt;/font&gt;&lt;/a&gt;.&lt;a name="#h8"&gt;&lt;font color="#000000"&gt;XML&lt;/font&gt;&lt;/a&gt; and Delete SessionKey value and paste in the value from 'clean' Metabase.&lt;a name="#h9"&gt;&lt;font color="#000000"&gt;XML&lt;/font&gt;&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;In IIS MMC use Create New Site (from file) wizard. Point the tool to &lt;a name="#h10"&gt;&lt;font color="#000000"&gt;SiteConfig&lt;/font&gt;&lt;/a&gt;.&lt;a name="#h11"&gt;&lt;font color="#000000"&gt;XML&lt;/font&gt;&lt;/a&gt;, click Read File, and select site to import. &lt;/li&gt;    &lt;li&gt;Repeat for all sites (Web, FTP, SMTP) and Application Pools.&lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;&lt;strong&gt; Other Notes&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;This entire situation becomes much simpler if you regularly create *password* encrypted backups of the Metabase. &lt;/strong&gt;&lt;/font&gt;&lt;font color="#000000"&gt;The following KB article discusses how to use &lt;em&gt;iisback.vbs &lt;/em&gt;to create backups (although it doesn't stress the importance of backing up with a password).&amp;#160; Password encrypted backups remove the dependency on the MachineKeys for decrypting the encrypted Metabase keys making the backup much more portable.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How To Create a Metabase Backup by Using IIS 6.0 in Windows Server 2003      &lt;br /&gt;&lt;/strong&gt;&lt;a href="http://support.microsoft.com/kb/324277"&gt;http://support.microsoft.com/kb/324277&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2143050" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/lprete/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.iis.net/lprete/archive/tags/Metabase/default.aspx">Metabase</category><category domain="http://blogs.iis.net/lprete/archive/tags/MachineKeys/default.aspx">MachineKeys</category></item></channel></rss>