title: Silverlight/WCF Deployment Issue
body: <p>I have a Silverlight application that communicates to a WCF service.  As part of the web.config file there is a required section to use WCF:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" 
  multipleSiteBindingsEnabled="true" /&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Upon deployment to a Windows 2008 server I get the following error when launching my Silverlight app:</p>
  
  <pre><code>Parser Error Message: It is an error to use a section registered as
  allowDefinition='MachineToApplication' beyond application level.  This error can be
  caused by a virtual directory not being configured as an application in IIS.
  
  Source Error:
  
  Line 29: 
  Line 30: &lt;system.serviceModel&gt;
  Line 31:         &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true"
  Line 32:             multipleSiteBindingsEnabled="true" /&gt;
  Line 33:     &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>After some research there are a couple of items that could cause this:</p>
  
  <ol>
  <li>The directory where the app resides is not setup as an application in IIS</li>
  <li>Multiple web.config files exist in one or more sub-directories underneath the application structure.</li>
  </ol>
  
  <p>Neither of these situations apply in my case.  My app <em>is</em> setup as an application under IIS and there is only <em>one</em> web.config file in the application structure.</p>
  
  <p>Any other reasons this message would occur?  It also happens if I explicitly define the authentication type in the web.config file for the app.</p>
  
  <p>Thanks for your help.</p>