Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I write below code to connect to an adobe connect server
adobe connect server responsed: Not Found

where is the mistake?
Please help to resolve this problem

What I have tried:

VB
Dim request As HttpWebRequest = WebRequest.Create("http://myip/api/xml?action=login&login=mupass@yahoo.com&password=mypass")

Dim response As HttpWebResponse = request.GetResponse()
Dim dataStream As Stream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim responseFromServer As String = reader.ReadToEnd()
TextBox1.Text &= responseFromServer

'Rsponse in textbox is"
'
'<results><status code="ok">
'<owasp_csrf_token><token>ba481f41bb75d42d6e021e8062960723dfd9b9cb6caf5b0d424f022a1ee00418
'


If CType(response, HttpWebResponse).StatusDescription = "OK" Then

    'read response header
    Dim strr As String = ""
    For i As Integer = 0 To response.Headers.Count - 1
        strr &= response.Headers.Keys(i) & "," & response.Headers(i)
    Next
    TextBox2.Text = strr

    'response header is:
    'Content-Length,194Cache-Control,max-age:5Content-Type
    ',text/xmlDate,Fri, 18 Sep 2020 17:06:59 GMTExpires,nowSet-Cookie,BREEZESESSION=breeziip2qd4cezwfbqhx;HttpOnly;path=/Server,Apache-Coyote/1.1


    'find seassion data:
    Dim toool As Integer = strr.IndexOf(";HttpOnly;") - strr.IndexOf("BREEZESESSION=") - 14
    strr = strr.Substring(strr.IndexOf("BREEZESESSION=") + 14, toool)
    Label1.Text &= strr

    'create new user with new question

    Dim reqq As HttpWebRequest = HttpWebRequest.Create("http://185.164.252.155/xml?action=principal-update&first-name=reza&last-name=yar&login=reza&email=reza@yahoo.com&password=123&type=user&has-children=0")

    Dim NewCooki As New Cookie("BREEZESESSION", strr, "/", "/")


    If reqq.CookieContainer Is Nothing Then
        reqq.CookieContainer = New CookieContainer
    End If
    reqq.CookieContainer.Add(NewCooki)
    Dim respp As HttpWebResponse = reqq.GetResponse
    Dim dataStream3 As Stream = respp.GetResponseStream()
    Dim reader3 As New StreamReader(dataStream3)
    Dim responseFromServer3 As String = reader3.ReadToEnd()
    TextBox3.Text &= responseFromServer3

   

End If
Posted
Updated 20-Sep-20 20:18pm
v2

1 solution

adobe connect server responsed: Not Found

You sure the url is correct?

I see:
WebRequest.Create("http://myip/api/xml?action=login&login=mupass@yahoo.com&password=mypass")

If this is the template, the url you use does not have api in it.
HttpWebRequest.Create("http://185.164.252.155/xml?action=principal-update&first-name=reza&last-name=yar&login=reza&email=reza@yahoo.com&password=123&type=user&has-children=0")


Base would be to check the url is reachable and valid before trying of in code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900