Help: Connecting to a password-protected webservice through a proxy server (ISA 2000)

Discussion in 'ASP .Net Web Services' started by Hanz Gruuber, Apr 29, 2005.

  1. Hanz Gruuber

    Hanz Gruuber Guest

    Hi,

    I am trying to access a webservice that uses windows' "built-in
    authentication" and my client program must acccess it through an ISA
    firewall. At first, i was able to connect to the webservice when outside of
    the firewall without a problem, but once the client program was running
    behind the ISA firewall, i began to receive 407 errors (proxy authentication
    required). I then associated a proxy with the webservice and it appears as
    though i am properly authenticating with the ISA server. But, I am now
    receiving a 401 error, which leads me to beleive that i am now properly
    authenticating through the ISA server, but i am no longer being properly
    authenticated by the web service. Below is the function that i'm using to
    connect to my web service trough the ISA server.

    I would like to know if anyone can tell me where i'm going wrong here or
    offer some suggestions.... (note: any variables that appear to not be
    declared in my function are declared as private members of the class...
    outside of the function.

    Thanks!

    Private Sub createWebserviceWithCredentials()
    Dim userName, password, domain As String
    userName = Me.txtUserName.Text
    password = Me.txtPassword.Text
    domain = Me.txtDomain.Text

    'Declare Web Service and proxy
    ws = New windowsClient.localhost.dataService
    pr = New WebProxy("http://10.0.0.2:8080", True)

    'Build Proxy Credentials
    proxy_user_credentialsProp = New NetworkCredential("proxyUser",
    "proxyPW", "proxyDomain")
    pr.Credentials = proxy_user_credentialsProp

    'Associate proxy with webservice
    ws.Proxy = pr

    'Build and associate web service with credentials
    webservice_user_credentialsProp = New NetworkCredential(userName,
    password, domain)
    ws.Credentials = webservice_user_credentialsProp
    End Sub
     
    Hanz Gruuber, Apr 29, 2005
    #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. ThatsIT.net.au

    RSS, XPathDocument and ISA proxy server

    ThatsIT.net.au, Mar 24, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    321
    ThatsIT.net.au
    Mar 24, 2007
  2. Claus Wittrup Hansen
    Replies:
    0
    Views:
    110
    Claus Wittrup Hansen
    Sep 18, 2003
  3. Andrew Jocelyn
    Replies:
    0
    Views:
    680
    Andrew Jocelyn
    Nov 29, 2008
  4. Andrew Jocelyn
    Replies:
    1
    Views:
    2,990
    Steven Cheng
    Dec 3, 2008
  5. SESDev
    Replies:
    6
    Views:
    2,885
    manjerekar annaji rao
    Oct 29, 2009
Loading...

Share This Page