1. Moshe Tangi
  2. PowerBuilder
  3. Tuesday, 26 September 2017 11:49 AM UTC

hi all


I am running a WS client ( the wizard + deceleration are fine builds in pb 2017  ) , but when  I am calling one of its functions i am getting : http 401 - Unauthorized .

the thing is , running from IE works great . calling the function works great and giving results ( on the same PC with the same user

Whats can be the problem ? Why calling from WS code getting error and calling from explorer works great ?


Any idea ?

someone told me something like : Delegation , Impersonation ..... Any one knows what does mean ?





Marco Meoni Accepted Answer Pending Moderation
  1. Friday, 6 October 2017 20:11 PM UTC
  2. PowerBuilder
  3. # 1


that is because you have basic authentication enabled in order to access the WS.

For example, if the WS is deployed to MS IIS, open IIS console -> Web Site -> Scroll down to the WS -> Authentication -> Basic Auth

Now, from PB WS clients you have two options:

  1. using the SoapConnection class:
    conn = CREATE SoapConnection
    conn.SetBasicAuthentication('', "username", "password")
  2. using a WS datawindow:
    lws_connection = CREATE wsconnection
    lws_connection.authenticationmode = "basic"
    lws_connection.username = "username"
    lws_connection.password = "password"

Hope that helps.



There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.