Web Services
Topic: Web Services Credentials , NetworkCredential, CredentialCache.DefaultCredentials

Ireland .NET Developer Alliance :: Forums

Page 1 of 1 (1 items)


Posted by Paul Fox on 03-22-2005 7:28
To pass the credentials that will be used by a proxy class to connect to a web service, create an instance of a network credential class (System.NET namespace) :

Dim credentials As New NetworkCredential("username", "password")

or

Dim credentials As New NetworkCredential("username", "password", "domain")

WebService1.Credentials = credentials 'WebService1 is the name of the proxy class

or

MyBase.Credentials = System.Net.CredentialCache.DefaultCredentials 'MyBase is the base class of the web service class : webservice1