title: Web Service Configuration Problem
body: <p>I host 2 WCF web services and 1 standard .NET web service from an application directory.  The .NET service and 1 of the WCF services works perfectly; however, the other WCF service is returning the following error:</p>
  
  <blockquote>
    <p>The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the web.config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.</p>
  </blockquote>
  
  <p>Both WCF web services have the line</p>
  
  <pre><code>&lt;AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)&gt; _
  </code></pre>
  
  <p>and the web.config file has </p>
  
  <pre><code>&lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
  </code></pre>
  
  <p>To add more confusion to the mix, when I change</p>
  
  <pre><code>AspNetCompatibilityRequirementsMode.Allowed
  </code></pre>
  
  <p>to</p>
  
  <pre><code>AspNetCompatibilityRequirementsMode.Required
  </code></pre>
  
  <p>the service works just fine.</p>
  
  <p>Also, changing</p>
  
  <pre><code>&lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" /&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;serviceHostingEnvironment aspNetCompatibilityEnabled="false" /&gt;
  </code></pre>
  
  <p>in the web.config also allows all web services to function.</p>
  
  <p>This problem is presenting on both IIS7 and our staging enviorment hosted on SBS2003 running IIS6.</p>
  
  <p>Thank you in advance for all of your help.<br>
  Jake</p>
  
  <p><strong>UPDATE:</strong><br>
  I was able to get it to work by deleting the application on my development system; however, the problem still persists on our staging server, even after deleting the application and recreating it there.</p>
  
  <p><strong>WORK AROUND:</strong>  </p>
  
  <ol>
  <li>Delete the Application from IIS</li>
  <li>Recreate the direcotry</li>
  <li>Create a New Application Pool</li>
  <li>In the properties of the direcotry, create the Application and associate it to the new Application Pool.</li>
  </ol>
  
  <p>What a pain.</p>