J
JD
Hello,
We have a windows form application that consumes a web service using the
standard service-proxy class created by "Add Web Reference..." (wsdl.exe). On
some end-user machines, the app needs to get out through an authenticating
proxy server to get to the internet.
In the MSDN docs for the HttpWebClientProtocol.Proxy member, it indicates
that the default behavior is to use the operating system's settings (Control
Panel->InternetSettings). We're either misunderstanding what that means or
finding it not to be the case. When the users in question just open IE and
browse to the web service end-point, they see it fine. When the app makes the
request using the web reference, it can't get past the proxy server
(Unauthorized/401). We've duplicated this on internal test machines as well
(clients are running XP Pro SP1), with a fairly simple test harness.
We then looked at using System.Net.CredentialCache.DefaultCredentials, which
the documentation says will be the current user's username/password/domain
details. Unfortunately, that didn't seem to work either and all the members
on DefaultCredentials are blank.
On the other hand, if we hardcode a login/password/domain in the test
harness, it connects OK. We would definitely prefer NOT to make our app's
"Options" dialog include an area for the user's proxy details -- especially
since we know they've already been specified in the system's "Internet
Settings" control panel applet.
Any insight into what the missing piece is for us here?
Thanks,
JD
We have a windows form application that consumes a web service using the
standard service-proxy class created by "Add Web Reference..." (wsdl.exe). On
some end-user machines, the app needs to get out through an authenticating
proxy server to get to the internet.
In the MSDN docs for the HttpWebClientProtocol.Proxy member, it indicates
that the default behavior is to use the operating system's settings (Control
Panel->InternetSettings). We're either misunderstanding what that means or
finding it not to be the case. When the users in question just open IE and
browse to the web service end-point, they see it fine. When the app makes the
request using the web reference, it can't get past the proxy server
(Unauthorized/401). We've duplicated this on internal test machines as well
(clients are running XP Pro SP1), with a fairly simple test harness.
We then looked at using System.Net.CredentialCache.DefaultCredentials, which
the documentation says will be the current user's username/password/domain
details. Unfortunately, that didn't seem to work either and all the members
on DefaultCredentials are blank.
On the other hand, if we hardcode a login/password/domain in the test
harness, it connects OK. We would definitely prefer NOT to make our app's
"Options" dialog include an area for the user's proxy details -- especially
since we know they've already been specified in the system's "Internet
Settings" control panel applet.
Any insight into what the missing piece is for us here?
Thanks,
JD