David Kadish

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Reading user info from Intranet #5008
    David Kadish
    Participant

    Hi Mike
    Finally I figured it out.
    In case somebody else needs it, here is the code (ASP.NET,VB)
    ———————-
    Dim request As WebRequest
    Dim responseData As String = “”
    Dim str As String = “”

    Dim request As WebRequest = WebRequest.Create(“https://11.22.33.44/ffws/v1/users/USERNAME”)

    request = WebRequest.Create(str)
    request.Credentials = New NetworkCredential(NAME, PASSWORD)
    request.Method = “GET”

    Try
    Dim response As WebResponse = Request.GetResponse()
    Dim strOK As String = CType(Response, HttpWebResponse).StatusDescription
    If strOK = “OK” Then
    responseData = WebResponseGet(request) ‘responseData
    UserFaxNumber = FaxNumber(responseData)
    response.Close()
    End If
    Catch ex As Exception
    End Try

    in reply to: Reading user info from Intranet #4970
    David Kadish
    Participant

    Hi Mike
    The following is the code I am using.
    ————————————————-
    Private Sub getUserInfo()
    Dim response As WebResponse

    ServicePointManager.Expect100Continue = False
    Dim request As WebRequest = WebRequest.Create(“https://11.22.33.44/ffws/v1/ofax/”)
    request.Credentials = New NetworkCredential(LoginUsername, LoginPassword)
    request.Method = “POST”

    Dim postData As String = “GET https://11.22.33.44/ffws/v1/users/USERNAME HTTP/1.1”
    Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postData)

    request.ContentType = “application/xml”
    request.ContentLength = byteArray.Length

    Dim dataStream As Stream = request.GetRequestStream()

    ‘ Write the data to the request stream.
    dataStream.Write(byteArray, 0, byteArray.Length)
    ‘ Close the Stream object.
    dataStream.Close()
    ‘ Get the response.
    response = request.GetResponse()
    Exit Sub
    End Sub
    ———————————————————-
    When I hold Ctrl key and click on https://11.22.33.44/ffws/v1/users/USERNAME I do get the right data, but no metter I try, I always get error on request.GetResponse() – “The remote server returned an error: (400) Bad Request.”
    Thanks,

    in reply to: Reading user info from Intranet #4965
    David Kadish
    Participant

    Hi
    I checked in the manual and it seems like I need to use Retrieving User Information function. I don’t understand the example. Can you please tell me how I can use the function with my ASP.NET code?

    Thanks,

    in reply to: Reading user info from Intranet #4956
    David Kadish
    Participant

    Hi
    Thank you for the reply.
    We have FaxFinder® FF240 system.
    I am an Intranet developer. In my intranet database I keep all the users, their phones and fax numbers. To get the fax numbers from FaxFinder, I login to Faxfinder app, click on Users and export the file to the folder. After that I read the file from the Internet and update the database. I have to do this every time there is new employee or somebody stops working here. I would like to automate the process and be able to read the data from the Intarnet directly. Is it possible?
    Thanks,

Viewing 4 posts - 1 through 4 (of 4 total)