title: Error Hosting a WCF Service in IIS 6.0
body: <p>I've currently got a service that I created on my machine and it worked fine locally, but when deployed to our Windows 2003 server using IIS 6.0 I get the exception:</p>
  
  <blockquote>
    <p>The HTTP request is unauthorized with
    client authentication scheme
    'Anonymous'.  The authentication
    header received from the server was
    'Negotiate,NTLM'.</p>
  </blockquote>
  
  <p>A quick google on the error leads one to believe that this is easy to fix, but none of the fixes have worked for me so far.</p>
  
  <p>Here's what I have in my service's Web.config:</p>
  
  <pre><code>&lt;services&gt;
     &lt;service name="WcfService2.Service1" 
              behaviorConfiguration="WcfService2.Service1Behavior"&gt;
       &lt;endpoint address="" binding="basicHttpBinding" 
                 bindingName="basicBindingConfig" 
                 contract="WcfService2.IService1"/&gt;
     &lt;/service&gt;
   &lt;/services&gt;
  
   &lt;bindings&gt;
     &lt;basicHttpBinding&gt;
       &lt;binding name="basicBindingConfig"&gt;
         &lt;security mode="TransportCredentialOnly"&gt;
           &lt;transport clientCredentialType="Ntlm"/&gt;
         &lt;/security&gt;
       &lt;/binding&gt;
     &lt;/basicHttpBinding&gt;
   &lt;/bindings&gt;
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name="WcfService2.Service1Behavior"&gt;
        &lt;serviceMetadata httpGetEnabled="true"/&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  </code></pre>
  
  <p>My test client has an App.config with this:</p>
  
  <pre><code>&lt;bindings&gt;
    &lt;basicHttpBinding&gt;
      &lt;binding name="basicBindingConfig_IService1"&gt;
        &lt;security mode="None"&gt;
          &lt;transport clientCredentialType="Ntlm" 
               proxyCredentialType="None" realm="" /&gt;
        &lt;/security&gt;
      &lt;/binding&gt;
    &lt;/basicHttpBinding&gt;
  &lt;/bindings&gt;
  </code></pre>
  
  <p>And my test client access call is:</p>
  
  <pre><code>Dim client As New ServiceReference1.Service1Client()
  
  client.GetData()
  </code></pre>
  
  <p>Any idea what's wrong here?  I've tried changing the Ntlm type to Windows and to None, neither of which worked.  I can navigate to it in the browser and it looks fine, but when I actually start trying to use it I get the above error.</p>