We have to connect to a 3rd party XML Web Service outside our LAN by
adding a WCF Service Reference to a simple console application
Problem:
When attempting to invoke any of the generated client class methods,
we recieve the following error: "The remote server returned an
unexpected response: (407) Proxy Authentication Required ( The ISA
Server requires authorization to fulfill the request. Access to the
Web Proxy service is denied. )."
In old style ASMX Web Reference:
TheServiceWse client = new TheServiceWse();
client.Proxy = new System.Net.WebProxy("ISA Server Name", 800);
client.Proxy.Credentials =
System.Net.CredentialCache.DefaultCredentials;
Where client is an instance of the generated Web Reference Proxy Class
However in WCF Service Reference:
I am not sure where to define the credentials of the user to pass
through the ISA server successfully. I've looked into the WCF Service
Configuration Editor, opened the app.Config file of my console
application, checked the following configurations but it didn't
succeed:
Bindings node -MyServicePort (basicHttpBinding) node -Binding tab -
ProxyAddress = <empty>Bindings node -MyServicePort (basicHttpBinding) node -Binding tab -
UseDefaultWebProxy = TrueBindings node -MyServicePort (basicHttpBinding) node -Security tab
-Mode = None
Bindings node -MyServicePort (basicHttpBinding) node -Security tab
-ProxyCredentialType = Windows
Bindings node -MyServicePort (basicHttpBinding) node -Security tab
- TransportClientCredentialType = Windows
TheServicePortClient client = new TheServicePortClient();
In this client instance, there is no proxy property that i can set or
set its credentials
Any advice is highly appreciated amigos