<?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 : applicationHost.config</title><link>http://blogs.iis.net/lprete/archive/tags/applicationHost_2E00_config/default.aspx</link><description>Tags: applicationHost.config</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>IIS7: The path is not of a legal form.</title><link>http://blogs.iis.net/lprete/archive/2009/05/03/iis7-the-path-is-not-of-a-legal-form.aspx</link><pubDate>Sun, 03 May 2009 14:53:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:3136465</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=3136465</wfw:commentRss><comments>http://blogs.iis.net/lprete/archive/2009/05/03/iis7-the-path-is-not-of-a-legal-form.aspx#comments</comments><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;I recently encountered the error “The path is not of a legal form.” from the IIS 7.0 Manager, but was unable to find any documentation on the error.&amp;#160; Oddly this error didn’t log anything in the System Event Log either.&amp;#160; &lt;/p&gt;  &lt;p&gt;The error sounds like a config issue so I focused on web.config and applicationHost.config.&lt;/p&gt;  &lt;h3&gt;Problem:&lt;/h3&gt;  &lt;p&gt;When expanding a website in the IIS Manager we get the error below.&amp;#160; This happens only for one specific web site, other sites are on the server are fine.&amp;#160; Additionally the problematic site continues to serve out pages without error.&amp;#160; The only real problem here is an inability to administer the web site.&lt;/p&gt;  &lt;h3&gt;Error:&lt;/h3&gt;  &lt;p&gt;Internet Information Services (IIS) Manager    &lt;br /&gt;The path is not of a legal form.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Screenshot:     &lt;br /&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Internet Information Services (IIS) Manager - The path is not of a legal form." border="0" alt="Internet Information Services (IIS) Manager - The path is not of a legal form." src="http://blogs.iis.net/blogs/lprete/IISError_6A687CC1.jpg" width="310" height="159" /&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Cause:&lt;/h3&gt;  &lt;p&gt;After inspecting applicationHost.config I noted that one application didn’t have a physical path specified.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-no-proof: yes; mso-ansi-language: en" lang="EN"&gt;&amp;lt;&lt;/span&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; color: #a31515; font-size: 10pt; mso-no-proof: yes; mso-ansi-language: en" lang="EN"&gt;application&lt;/span&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-no-proof: yes; mso-ansi-language: en" lang="EN"&gt; &lt;/span&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; color: red; font-size: 10pt; mso-no-proof: yes; mso-ansi-language: en" lang="EN"&gt;path&lt;/span&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; color: blue; font-size: 10pt; mso-no-proof: yes; mso-ansi-language: en" lang="EN"&gt;=&lt;/span&gt;&lt;span style="line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes; mso-ansi-language: en" lang="EN"&gt;&amp;quot;&lt;span style="color: blue"&gt;/appdir&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;applicationPool&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;DefaultAppPool&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;virtualDirectory&lt;/span&gt;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="color: red"&gt;path&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;/&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt; &lt;/span&gt;&lt;span style="background: yellow; color: red; mso-highlight: yellow"&gt;physicalPath&lt;/span&gt;&lt;span style="background: yellow; color: blue; mso-highlight: yellow"&gt;=&lt;/span&gt;&lt;span style="background: yellow; mso-highlight: yellow"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span style="color: blue"&gt; /&amp;gt;         &lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;application&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Notes:&lt;/h3&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;This is a situation that we should never find ourselves in, unfortunately we did.&amp;#160; The IIS manager wouldn’t let us make this kind of configuration setting, the physicalPath is required.&amp;#160; In our case we got here by a third party application installation failure.&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;After noting the config error in the applicationHost.config we also determined that the problem was detectable in the IIS Manager itself by viewing the applications in the application pool.&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="View Applications" border="0" alt="View Applications" src="http://blogs.iis.net/blogs/lprete/image_3C0EF714.png" width="500" height="399" /&gt; &lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;Once we were viewing the various applications in the application pool it was obvious that there was one application which had it’s Physical path set to blank.&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Missing Physical Path" border="0" alt="Missing Physical Path" src="http://blogs.iis.net/blogs/lprete/image_29C63052.png" width="500" height="175" /&gt;&amp;#160;&lt;/p&gt;  &lt;p style="line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none" class="MsoNormal"&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Solution:&lt;/h3&gt;  &lt;p&gt;All Applications must have a valid physical path.&lt;/p&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=3136465" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/lprete/archive/tags/applicationHost_2E00_config/default.aspx">applicationHost.config</category><category domain="http://blogs.iis.net/lprete/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.iis.net/lprete/archive/tags/IIS+7.0/default.aspx">IIS 7.0</category></item></channel></rss>