I have a scenario where I am running a web app but need to update the web page with data submitted through HandlURL from different app.
This works consistently and flawlessly when running on my Mac.
When I deploy to Xojo Cloud, it stops.
I made a simple test to demonstrate. The web page has an text field and a button, which assigns the content of the text field to session.myid
In the HandleURL I have the following code:
If request.Path <> “test” Then Return False
Var s() As String
For i As Integer = 1 To app.SessionCount
s.add i.ToString()+“:”+app.SessionAt(i-1).myid
Nextresponse.Write "There are “+app.SessionCount.ToString()+” sessions: "+String.FromArray( s, ", ")
Return True
And in a desktop app, I’m sending a request to the server as so (changing the URL when testing remote or local):
Var u As New URLConnection
Var s As String = u.SendSync(“GET”,“https://MYURL.xojocloud.net/test”)TextArea1.Text=s
Each time I run this against the Xojo cloud deployment I get the following response:
There are 0 sessions:
When I run the web app on my Mac, I get:
There are 2 sessions: 1:Session 1, 2:Session 2
I have no doubt that I’m doing something stupid. I just can’t figure out what it is.
The fact that it works one way on Mac and differently on XojoCloud is a bit distressing.
Is Xojo Cloud spewing off additional instances of the app that cannot see each other?
Any help would be greatly appreciated.
Thanks in advance.