I have a WCF service, IIS. It is protected by basic authentication.
When I browse the browser, I get 401 (nt call) and 200 (successful response). The same site, page, etc., With a WCF request through a console application, I get 401, then 404 (page not found).
Both use the same username and password that are correct. A machine is just a development desktop. Not in the domain. Host - hostwebsite.local through binding the host file to 127.0.0.1
Here are the IIS logs. The first two lines are an unsuccessful WCF call. The last 2 lines are a successful browser call.
The only real difference is GET / POST. WCF works when authentication is anonymous.
How can I debug this problem? thank.
2011-03-31 22:56:37 W3SVC2 MIKEV-WS 127.0.0.1 POST /Services/EchoService.svc - 80 - 127.0.0.1 HTTP/1.1 - - - hostwebsite.local 401 2 5 6633 362 3
2011-03-31 22:56:37 W3SVC2 MIKEV-WS 127.0.0.1 POST /Services/EchoService.svc - 80 admin 127.0.0.1 HTTP/1.1 - - - hostwebsite.local 404 0 0 210 568 2
2011-03-31 22:57:07 W3SVC2 MIKEV-WS 127.0.0.1 GET /Services/EchoService.svc - 80 - 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US)+AppleWebKit/534.16+(KHTML,+like+Gecko)+Chrome/10.0.648.133+Safari/534.16 - - hostwebsite.local 401 2 5 6633 442 1
2011-03-31 22:57:10 W3SVC2 MIKEV-WS 127.0.0.1 GET /Services/EchoService.svc - 80 admin 127.0.0.1 HTTP/1.1 Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+en-US)+AppleWebKit/534.16+(KHTML,+like+Gecko)+Chrome/10.0.648.133+Safari/534.16 - - hostwebsite.local 200 0 0 1287 485 23
New information
Now the problem is solved, and I have listed the answer below.