title: AspNetCompatibilityEnabled causes WCF Timeout
body: <p>I'll do my best to explain the issue I'm having.  I'm working on an old WCF service and recently updated to .Net 4.0.  Upgrading from 3.5 broke the service - basically, the service is timing out even though it appears responsive.  After hours of debugging, I've concluded the culprit is <code>aspNetCompatibilityEnabled="true"</code> in the web.config.  This is needed as the WCF service accesses the <code>HttpContext.Current</code> object.</p>
  
  <p>If I set the value to false, navigating to the .svc responds quickly (as does navigating to the wsdl), and I'm able to connect using a test client (although it breaks because the service needs access to <code>HttpContext</code> to work correctly).  However, if I leave the setting set to true as needed, navigating to the service brings up the standard .Net service page however it continues to load, as if the stream isn't closed, until finally I get Firefox's "The connection was reset" error.  Firebug is showing a returned size of 0 bytes, even though clicking the "HTML" tab of the response shows it is returning something, and fiddler spins until it reaches a 504 error.</p>
  
  <p>The service is decorated with <code>[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]</code>.  This was working before the upgrade to .Net 4.0.</p>
  
  <p>I think I've reached the end of the internet while searching for the answer to this problem.  I've tried every solution any blog has had to offer. I've enabled tracing and the trace file produced does not show any error, and there are no entries in the event viewer.</p>
  
  <p>This is broken on both the development server (Windows Server 2003 (x86) + iis6) AND the production server (Windows Server 2003 64-bit + iis6). I've attached a screenshot showing the service help page does come up but continues to spin.</p>
  
  <p>All clients are getting timeout errors and are unable to use the service. All help is greatly appreciated!</p>
  
  <p><img src="https://i.stack.imgur.com/YA8pw.png" alt="enter image description here"></p>