title: WCF TransportCredentialOnly not sending username and password
body: <p>I have the following WCF client configuration:</p>
  
  <pre><code>&lt;basicHttpBinding&gt;
     &lt;binding name="basicHttpOCCWS" closeTimeout="00:01:00" openTimeout="00:01:00"
                   receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
                   bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                   maxBufferSize="100000000" maxBufferPoolSize="524288"
                   maxReceivedMessageSize="100000000" 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="TransportCredentialOnly"&gt;
           &lt;transport clientCredentialType="Basic" /&gt;            
        &lt;/security&gt;
     &lt;/binding&gt;
  &lt;/basicHttpBinding&gt;
  </code></pre>
  
  <p>In code, I am setting the username and password as follows:</p>
  
  <pre><code>client.ClientCredentials.UserName.UserName = _cacledUserId;
  client.ClientCredentials.UserName.Password = _cachedPassword;
  </code></pre>
  
  <p>However, the web service running on Tomcat is returning an error:</p>
  
  <p>"An authentication object was not found in the security context."</p>
  
  <p>When I look at the HTTP header, it is missing credential information as shown below:</p>
  
  <pre><code>POST /occ600webservice/services/OCC_WS HTTP/1.1
  Content-Type: application/soap+xml; charset=utf-8; action=""
  Host: 192.54.173.130:8080
  Content-Length: 2223
  Expect: 100-continue 
  </code></pre>
  
  <p>Why are my credentials not being sent?</p>
  
  <p>TIA.</p>
  
  <p>Klaus</p>