Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configuring / Securing Webservices

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
0
0
GB
Apologies if this isnt quite the right thread, but it was the most suitable one I could find.

Ive a webservice in VB.Net and the requirement is for the clients to log in using basic windows authentication.

Ive changed the Web Config of the webservice to read
Code:
  <authentication mode="Windows" /> 
  <authorization>
      <deny users="?" />
  </authorization>

Ive added the following to my client where the webservice is called;
Code:
Dim service As New AddNewOrder.AddNewOrderService
Dim _credentialCache As CredentialCache = New CredentialCache

Dim credentials As NetworkCredential = New _
           NetworkCredential(<<name>>, <<password>>)

_credentialCache.Add(New Uri(service.Url), "Basic", _
                              credentials)
        service.Credentials = _credentialCache

and I get a 401 error.
IIS is set up to use basic windows authentication.

So what step(s) have I missed out or got wrong here?
(name and password are those I use to log on to the machine)

Cheers

K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top