I'm currently developing an application that needs to communicate with a webservice on the internet. Internet explorer is until know the only application that is connecting to the internet through a proxy server.
The proxy settings are setup to "Use automatic configuration script".
I have kept the default setting
<binding useDefaultWebProxy="true" />
And additionally set
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="Basic"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
But no luck. I keep getting "(407) Proxy Authentication Required."
I have done some Google-ing, but the solutions do not seem to fit my situation.
Short update: The application should run with the default user credentials, and use those credentials through NTLM to authenticate with the proxy. But even when I set the client to do that it doesn't seem to help.
On the Tools menu, click Internet Options, and then click Connections. Click Settings or LAN Settings. In the Automatic configuration area, check that you've chosen the Use automatic configuration script box, and that it has the correct location to your automatic configuration script or for your automatic proxy URL.
Proxy is an object in memory on the client-side that exposes the same Interface or API that the WCF service does. Your consuming code will make calls against that proxy and proxy will dispatch those calls as SOAP Messages to the WCF service.
Keep the <binding useDefaultWebProxy="true" />
setting, and make sure useDefaultCredentials
is set to true in your app.config file (this setting is false
by default):
<system.net>
<defaultProxy useDefaultCredentials="true"/>
</system.net>
For more information, see my blog post "Using HTTP Proxy Servers".
I can't give you any background on why but setting:
<binding useDefaultWebProxy="false" />
Works for me in my current environment when getting your exact error. Everyting in Windows seems to use the IE-configurable internet settings which include the default proxy. Internet explorer fixes this up for you neatly when running but if you try to retrieve the service wsdl or so using Firefox I´m guessing you would end up having a user login prompt.
In any case, try to false the default proxy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With