WCF to WCF communication 401, HttpClient
Posted
by
youwhut
on Stack Overflow
See other posts from Stack Overflow
or by youwhut
Published on 2012-04-13T12:57:13Z
Indexed on
2012/04/15
17:29 UTC
Read the original article
Hit count: 448
I have a WCF REST service that needs to communicate with another WCF REST service.
There are three websites:
- Default Web Site
- Website1
- Website2
If I set up both services in Default Web Site and connect to the other (using HttpClient
) using the URI http://localhost/service then everything is okay.
The desired set-up is to move these two services to separate websites and rather than using the URI http://localhost/service, accessing the service via http://website1.domain.com/service still using HttpClient
.
I received the exception:
System.ArgumentOutOfRangeException: Unauthorized (401) is not one of the following: OK (200), Created (201), Accepted (202), NonAuthoritativeInformation (203), NoContent (204), ResetContent (205), PartialContent (206)
I can see this is a 401, but what is going on here?
Thanks
© Stack Overflow or respective owner