title: ASP.NET - IIS7 Deployment Error 500 24 50 using WCF Web Service Binding w/ AD Groups
body: <p>Background: I am getting a Internal Server 500 24 50 error after deploying an application that has compiled without errors on my local machine. The server that the application is deployed on has a ton of security and is running IIS 7.5 so I need to specify read and write access for every directory. This application uses windows authentication and a web service to populate drop down boxes via a proxy. I think there might be an issue connecting to the web service or an issue with the read/write security on the files, or an issue with the active directory authentication.</p>
  
  <p>For some reason, Internet Explorer just displayed can't load webpage Error. </p>
  
  <p>Error in Google Chrome: </p>
  
  <pre><code> 500 – Internal Server Error.
   There is a problem with the resource you are looking for, and it cannot be displayed. 
  </code></pre>
  
  <p>Log File Details:</p>
  
  <pre><code> #Software: Microsoft Internet Information Services 7.5
   #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
  
   2011-05-18 13:54:46 W3SVC1 FL-TPA-WEB-01 172.17.1.25 GET / - 80 - 
   172.17.1.25 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;
   +Trident/4.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET4.0C;+.NET4.0E) - -
   invitations.myagencyservices.com 500 24 50 1380 368 15
  </code></pre>
  
  <p>MSDN Defines the error at <a href="http://support.microsoft.com/kb/943891" rel="nofollow">http://support.microsoft.com/kb/943891</a> as: </p>
  
  <pre><code>  500.24 - An ASP.NET impersonation configuration does not apply in Managed 
             Pipeline mode.
  </code></pre>
  
  <p>Web.Config code: </p>
  
  <pre><code>  &lt;system.web&gt;
    &lt;customErrors mode="Off" &gt;&lt;/customErrors&gt;
    &lt;compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /&gt;
    &lt;trace enabled="true" pageOutput="true" /&gt;
  
  
    &lt;authentication mode="Windows"/&gt; 
    &lt;identity impersonate="true"/&gt;  
  
      &lt;authorization&gt;          
      &lt;allow users="alg\bmccarthy, alg\phoward" /&gt;               
      &lt;allow roles="alg\ACOMP_USER_ADMIN" /&gt;
      &lt;allow roles="alg\ACOMP_user_AMG" /&gt;
      &lt;allow roles="alg\ACOMP_user_BIG" /&gt;
      &lt;allow roles="alg\ACOMP_user_NIS" /&gt;
      &lt;allow roles="alg\ACOMP_user_GLA" /&gt;
      &lt;allow roles="alg\ACOMP_user_PIP" /&gt;
      &lt;allow roles="alg\ACOMP_user_PSM" /&gt;
      &lt;allow roles="alg\ACOMP_user_PAM" /&gt;
      &lt;allow roles="alg\ACOMP_user_ANN" /&gt;
      &lt;allow roles="alg\ACOMP_user_AAM" /&gt;
      &lt;allow roles="alg\ACOMP_user_MWM" /&gt; 
      &lt;allow roles="alg\ACOMP_user_GIM" /&gt;
      &lt;deny users="*" /&gt;      
    &lt;/authorization&gt; 
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
  
    &lt;system.serviceModel&gt;
      &lt;bindings&gt;
      &lt;basicHttpBinding&gt;
      &lt;binding name="BasicHttpBinding_IAcompService1" closeTimeout="00:01:00"
        openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
        allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
        useDefaultWebProxy="true"&gt;
        &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
        &lt;security mode="None"&gt;
          &lt;transport clientCredentialType="None" proxyCredentialType="None"
            realm="" /&gt;
          &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt;
          &lt;/security&gt;
        &lt;/binding&gt;
     &lt;/basicHttpBinding&gt;
    &lt;/bindings&gt;
  
      &lt;client&gt;
          &lt;endpoint address="http://63.236.108.91/aCompService.svc" binding="basicHttpBinding"
      bindingConfiguration="BasicHttpBinding_IAcompService1" contract="aComp_ServiceReference.IAcompService"
      name="BasicHttpBinding_IAcompService1" /&gt;
      &lt;/client&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Any suggestions will be up-voted! 
  Thanks for looking! </p>