webservice security

Discussion in 'ASP .Net' started by Rotsey, Jun 24, 2006.

  1. Rotsey

    Rotsey Guest

    I have created a ASP.NET 2.0 websevrice on a server and I want to secure it
    with Windows authentication

    The web service is in a Vritual Directory.

    I have add a Windows user to the server.
    I have set the security to Integrated Windows Authentication and removed
    anonymous access
    I have set Perimissons on the folder for full control to the web service
    folder.

    I am accessing the service in a win forms app
    This is code I am using

    Dim mycredentialCache As CredentialCache = New CredentialCache()

    ' Create a new instance of NetworkCredential using the client

    ' credentials.

    Dim credentials As NetworkCredential = New _

    NetworkCredential("user", "password", "")

    ' Add the NetworkCredential to the CredentialCache.

    mycredentialCache.Add(New Uri(tWeb.Url), "Basic", _

    credentials)

    ' Add the CredentialCache to the proxy class credentials.

    tWeb.Credentials = mycredentialCache

    ds = tWeb.GetData(lstTables.SelectedItem.ToString, txtCount.Text,
    txtSort.Text, txtWhere.Text)

    But I get HTTP 401 Unauthorized message.

    Any ideas???
     
    Rotsey, Jun 24, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. batista
    Replies:
    1
    Views:
    939
    Laurent Bugnion
    Jan 26, 2006
  2. batista
    Replies:
    0
    Views:
    575
    batista
    Jan 26, 2006
  3. Mr. x
    Replies:
    2
    Views:
    728
    Andrew
    Oct 10, 2003
  4. Cyril
    Replies:
    2
    Views:
    4,521
    Cyril
    Jun 1, 2006
  5. Mr. x

    use another webservice in a webservice

    Mr. x, Sep 26, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    150
    Mr. x
    Sep 26, 2003
Loading...

Share This Page