Android Question NeworkCredential Error

Discussion in 'Android Questions' started by M Zuhri, Aug 12, 2019.

  1. M Zuhri

    M Zuhri Member Licensed User

    Hi all,
    Can anyone help me, in http job, how to use NetworkCredential. I have use this technique in and now i need to connect through b4a.

    Dim request As WebRequest = WebRequest.Create(Uri.Trim)
    request.Credentials = New NetworkCredential(Username, Password)

    .B4A CODE
    j.Username = "Administrator"
    j.Password = "456

    B4A code gives me error,
    "ResponseError. Reason: Failed to connect to localhost/, Response:"
  2. Erel

    Erel Administrator Staff Member Licensed User

    localhost is wrong. localhost = current device or current emulator.
    M Zuhri likes this.
  3. M Zuhri

    M Zuhri Member Licensed User

    Yes Erel, after i change it to ip address only it start working... Thanks
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice