I am trying to communicate between a Windows Service on several PCs, and a WCF service hosted on my web server (different network).
When there is no proxy between the client and server, communication works fine.
However, when there is a proxy in place between client and server, I cannot figure out how to authenticate against it.
In the old .asmx days, I did something like this:
myService.Proxy = new WebProxy("internal.proxyserver.com", 8080)
{
Credentials = new NetworkCredential("myusername", "mypassword" , "mydomain");
};
I couldn't find an equivalent way to do this in WCF.
I have tried changing the DefaultWebProxy of the WebRequest object, and assigning credentials that way, but this doesn't seem to work, and I am unable to connect to the web service.
ASMX made this very easy; can somebody explain the correct procedure for this in WCF?
EDIT: The relevance of mentioning that this is in a Windows Service is that the client runs without a user supplying credentials, they need to be hard coded/config filed into the application.