Click here to Skip to main content
15,921,716 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:

Dim request As HttpWebRequest = WebRequest.Create("http://myip/api/xml?action=login&")

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">

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)
    TextBox2.Text = strr

    'response header is:
    ',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("")

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

    If reqq.CookieContainer Is Nothing Then
        reqq.CookieContainer = New CookieContainer
    End If
    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
Updated 20-Sep-20 20:18pm

1 solution

adobe connect server responsed: Not Found

You sure the url is correct?

I see:

If this is the template, the url you use does not have api in it.

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