bruno65 Posted May 9 Posted May 9 i added another application in the hyper_server.cfg file : [application-0] enabled=1 alias=other binary_name=mySecondApp.exe max_nodes=10 persistent_node=0 [hyper_server] binary_name=myApp.exe initial_nodes=2 max_nodes=10 max_sessions=0 sessions_per_nodes=0 prompt_login=0 persistent_node_zero=0 port=8077 ... in the hyper_server log file i've got : hyper_server.dll: 000033E4: 18:15:57 []:Creating Node: #2 hyper_server.dll: 000033E4: 18:15:57 [Attempting to Create]:"\\?\P:\DEV\dll\mySecondApp.exe" /node_id=2 /mode=node /app="other" /rel_server_url="&aexhxy230905090123656" /cluster_mode=0 /service=true /port=16386 hyper_server.dll: 000033E4: 18:15:57 [New Node Created.]: Process Id: 4860 hyper_server.dll: 000033E4: 18:15:57 [Waiting Node...]:2 hyper_server.dll: 000033E4: 18:15:57 []:Started Pinging Node: 2 hyper_server.dll: 000033E4: 18:15:59 []:Ping Failed Node: 2 Retry: 0 hyper_server.dll: 000033E4: 18:16:01 []:Ping Failed Node: 2 Retry: 1 hyper_server.dll: 000033E4: 18:16:04 []:Ping Failed Node: 2 Retry: 2 hyper_server.dll: 000033E4: 18:16:07 []:Ping Failed Node: 2 Retry: 3 hyper_server.dll: 000033E4: 18:16:09 []:Ping Failed Node: 2 Retry: 4 hyper_server.dll: 000033E4: 18:16:12 []:Ping Failed Node: 2 Retry: 5 hyper_server.dll: 000033E4: 18:16:14 []:Ping Failed Node: 2 Retry: 6 hyper_server.dll: 000033E4: 18:16:17 []:Ping Failed Node: 2 Retry: 7 hyper_server.dll: 000033E4: 18:16:19 []:Ping Failed Node: 2 Retry: 8 hyper_server.dll: 000033E4: 18:16:22 []:Ping Failed Node: 2 Retry: 9 hyper_server.dll: 000033E4: 18:16:25 []:Ping Failed Node: 2 Retry: 10 hyper_server.dll: 000033E4: 18:16:27 []:Ping Failed Node: 2 Retry: 11 hyper_server.dll: 000033E4: 18:16:27 [TUniHyperNode.Terminate]:Node #2 forcefully terminated. hyper_server.dll: 000033E4: 18:16:27 [TUniHyperNode.Terminate]:Node #2 successfully terminated. hyper_server.dll: 000033E4: 18:16:27 [HttpExtensionProc[::1]]:Exception : Failed to initialize node: 2 : Addr: $0641F1B9 So what's wrong in the configuration file or elsewhere ? Quote
Administrators Farshad Mohajeri Posted May 9 Administrators Posted May 9 Hi Make sure second app exe is a valid unigui application. Quote
bruno65 Posted May 10 Author Posted May 10 ok Frashad, i don't know if i must use "http://localhost/mywebapps/hyper_server.dll/other" or "http://localhost/mywebapps/other/hyper_server.dll" to reach the second webapp. Which is the right way to go ? Quote
Administrators Farshad Mohajeri Posted May 10 Administrators Posted May 10 http://localhost/mywebapps/hyper_server.dll/other Quote
bruno65 Posted May 10 Author Posted May 10 i found it : http://localhost/mywebapps/hyper_server.dll/other is the right way. Last question : how can i get the url above with code ? uniSession.URL gives http://localhost/mywebapps/hyper_server.dll the alias /other is not included. Why ? Quote
Administrators Farshad Mohajeri Posted May 11 Administrators Posted May 11 You can also use: UniSession.UrlReferer Quote
bruno65 Posted May 12 Author Posted May 12 i log Unisession.UrlReferer in the procedure TUniMainModule.UniGUIMainModuleBeforeLogin(Sender: TObject; var Handled: Boolean); but its value is empty. i need to get the url (with the alias) from that event handler because i'll make a POST request to keycloak from here Quote
Administrators Farshad Mohajeri Posted May 12 Administrators Posted May 12 You can try: UniSession.ARequest.Referer: Quote
bruno65 Posted May 12 Author Posted May 12 i get the alias /other with ARequestInfo.URI in the procedure TUniServerModule.UniGUIServerModuleHTTPCommand(ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); Quote
Administrators Farshad Mohajeri Posted May 12 Administrators Posted May 12 Another method: UniServerModule.App; Quote
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.