(04-24-2018, 04:42 AM)DanielFields Wrote: CustomContentHandlers will work. I keep forgetting that there are two options in that area. The other option is to pass the form as a parameter. You could then use the OnGetMainForm event in the server controller.
Your URL would be a little different: http://mydomain.com:8888/$/start/?blue.html. The server would see "blue" as WebApplication.RunParams[0]. You would use that in your logic for the event.
That will work ok. thank you for the tip :-)
(04-24-2018, 12:16 AM)DanBarclay Wrote:(04-23-2018, 09:33 AM)AllBars Wrote: Thank you both for pointing me at the ContentHandlers example.
Unfortunately, it suffers from exactly the same problem.
The example defines three URLs /blueform.html /redform.html and /mydoc.html (which redirects to an external page) it also has am additional main form.
Starting the session using the URL http://127.0.0.1:8000/bluform.html in a browser does not give the blueform page, but gives the mainform instead. once the session has started the URL does indeed give the blueform.
Is this only a problem with C++ only?
You are correct, that example does require the main form to be executed in order to start the session. I haven't done this specifically, as you are looking for, so I'm not going to be much more help. But that doesn't keep me from making suggestions. <g>
You might look at CustomContenHandler. I've used those before but as a different mission (serving up XML single message service). I'm fairly sure that has some option to serve up a form, and maintain the session. I just haven't had the need to look into it.
Another potential option, if you don't mind another "Splash style" form coming up initially is to allow a "Main" form to come up, but have that form launch your target. I've done that by launching in an async timer event off the main form. In my case I intentionally wanted a flash message to appear, but if you can make it look like you want that splash then it works great.
But, again, I'm pretty sure there is a way to do exactly what you're looking for... I just don't know the details. I'm pretty sure it will involve a CustomContentHandler.
Dan
That might have worked, but Dan Fields solution is cleaner. Thank you for the suggestions.
This feels a lot like a bug to me though. The same URL gives different results depending on if the session has already been started or not.
Ian