Luis Devis Posted March 25, 2021 Share Posted March 25, 2021 Hello, I'm really new to UNIGUI and web developement and I don't really understand how sessions work. Please tell me what am doing wrong. I have developed a program with UNIGUI on ISAPI that works really good until one of the connected devices crashes or quits the app. When one connection is cancelled (web browser closes or the user closes my app tab) and tries to connect again the server seems to be lost for it, it cannot connect again. The other connections work fine but others can not connect again. Besides, the server icon disappears in the system. Please tell what do you suspect I am doing wrong. Thank you. Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2021 Share Posted March 25, 2021 Luis, as a suggestion, why don't you develop your project as a StandAlone EXE project first, then when all is working as expected, rebuild it as a Service or ISAPI dll and deploy. As I see it ServerModule orchestrates all HTTP/HTTPS activity etc. (Parent) MainModule is a child process of ServerModule and handles current session activity (Children) Forms are child processes of MainModule (GrandChildren) ... In my projects I build all of my DB objects in ServerModule and access my DB objects via MainModule as Forms require. Quote Link to comment Share on other sites More sharing options...
Luis Devis Posted March 25, 2021 Author Share Posted March 25, 2021 Thank you Andyhill for your advise. I'll focus on Mainmodule Just one question If you have your DBObjects in the ServerModule how do you access them via MainModule? Quote Link to comment Share on other sites More sharing options...
andyhill Posted March 25, 2021 Share Posted March 25, 2021 In my case I use ElevateDB so on the ServerModule we have an ElevateDB Server Object (for general backend work unrelated to sessions) and on the MainModule we have another ElevateDB Server Object (used for Session Access only [SELECT/INSERT/DELETE/UPDATE etc.]) unrelated to the ServerModule Object. Form can access MainModule if UniMainModule.MyQuery1.Active then UniMainModule.MyQuery1.Close; Form and MainModule can also access ServerModule HOWEVER I WOULD STRONGLY DISCOURAGE if UniServerModule.SrvQry1.Active then UniServerModule.SrvQry1.Close; Quote Link to comment Share on other sites More sharing options...
Luis Devis Posted March 26, 2021 Author Share Posted March 26, 2021 👌 Great, thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.