State 200 IIS (Browser) - 404 (Wcf)

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.

#Software: Microsoft Internet Information Services 7.5
#Version: 1.0
#Date: 2011-03-31 22:53:58
#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-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.

+1
2

, http://hostwebsite.local/Services/EchoService.svc/Services/EchoService.svc

http://hostwebsite.local/Services/EchoService.svc

, /Services/EchoService.svc

<services>
    <service name="API.Proxy.EchoProxy" behaviorConfiguration="MyServiceTypeBehaviors">
        <endpoint address="[CLEARED]" binding="basicHttpBinding" contract="API.Contract.IEcho" bindingConfiguration="NewBinding" />

<client>
    <endpoint address="http://hostwebsite.local/Services/EchoService.svc" binding="basicHttpBinding" bindingConfiguration="SecureBinding" contract="API.Contract.IEcho" name="SecureEndpoint">
+2

, ... POST, - GET... , !

+1

All Articles