Re: Default credentials
From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 07/09/04
- Next message: Wild Wind: "Re: Default credentials"
- Previous message: Andy: "Web Service project configuration in Visual Studio 2003."
- In reply to: Wild Wind: "Default credentials"
- Next in thread: Wild Wind: "Re: Default credentials"
- Reply: Wild Wind: "Re: Default credentials"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 9 Jul 2004 19:34:12 -0300
If you need to pass certain credentials to your proxy WS class, just use
something like this:
CredentialCache cache = new CredentialCache();
cache.Add( new Uri( WSProxy.Url ), "Negotiate", new NetworkCredentials(
"youruser", "yourpwd", "yourdomain") );
WSProxy.Credentials = cache;
If you use NTLM auth in IIS, "Negotiate" will be fine. If you use "Basic"
auth instead, just put "Basic" where it says "negotiate".
-- Hernan de Lahitte Lagash Systems S.A. http://weblogs.asp.net/hernandl This posting is provided "AS IS" with no warranties, and confers no rights. "Wild Wind" <nobody@blackhole.com> wrote in message news:2l7h6qF9ch05U1@uni-berlin.de... > Hello, > > I have an application which calls a web service across the > Internet from a client machine. > > The site that I have deployed the application to is such that > to browse the Internet using a web browser, a person needs to > do the following: > > (a) ensure that a proxy server address is specified; > > (b) enter a username and password into an authentication dialog > that comes up whenever they start up the web browser. > > I am finding that as a result, I cannot connect at all to the > Internet directly. > > > I have deployed the same application on other sites that use > a proxy server to connect to the Internet by specifying the > proxy server address in my config file and using this address > to create a proxy for the web service using the following code: > > Dim WSProxy as MyWebServiceProxy > WSProxy.Proxy = New WebProxy(proxyServerAddresss, True, _ > Nothing, CredentialCache.DefaultCredentials) > WSProxy.CallWebServiceMethod() > > However, this works at client sites where I *don't* have to specify > further authentication before web browsing. In other words, it > *doesn't* work for the client site first mentioned above. > > > My questions are: > > When someone supplies the authentication details when they want > to use the web browser, are those details added to a CredentialCache? > > If so, can I get at this CredentialCache to get these credentials? > > If not, should I create my own credentials based on the username, > password and domain that the user normally enters when accessing > the web via a web browser? > > TIA, > > -- > Akin > > aknak at aksoto dot idps dot co dot uk > > >
- Next message: Wild Wind: "Re: Default credentials"
- Previous message: Andy: "Web Service project configuration in Visual Studio 2003."
- In reply to: Wild Wind: "Default credentials"
- Next in thread: Wild Wind: "Re: Default credentials"
- Reply: Wild Wind: "Re: Default credentials"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|