|
<< Click to Display Table of Contents >> Navigation: Telegram > 2023 > 05 > 25 > Telegram_2023-05-25T07 |
2023-05-25T07:50:04
Hi all. Does anyone have experience getting the CGI Runner to work with http.sys applications. I can run the CGIRunner2 demo project without problems, but when I attempt to copy this code into my http.sys app, it seems to attempt to invoke the server a second time but this fails due to the requirement for administrator permissions on http.sys
2023-05-25T07:50:31
Does anyone know which event to use when the user closes the session ( but not the server ) ? I have a need to clean up tmp files after the user closes his session, but none of them work - unless or until the actual server is shutdown. ( not what i want ). I dont want to shutdown the server to clean up files, just the session.
2023-05-25T07:51:03
john - yeah, you have to run it as admin priv to get httpsys to work correctly.
2023-05-25T07:52:54
Thanks Michael - I'm running the main app in administrator mode, but the cgirunner appears to be attempting to create a second instance of my http.sys server during the PrintReport procedure
2023-05-25T07:54:32
??? that sounds very strange.
2023-05-25T07:54:52
how is your code to create forms ?
2023-05-25T07:55:10
I thought so too. I expect I haven't copied in the code properly from the demo. It happens at the line CGIRunner.Execute(WebApplication, WebApplication.Request);
2023-05-25T07:55:40
Standard approach e.g. TIWMyForm.Create(WebApplication).Show
2023-05-25T07:55:47
i suspect your code to create/destroy forms is not accurate.
2023-05-25T07:56:12
I use the UserSession.Destroy event to free user session dependant data. This event is called when the timer to reconnect the session runs out I believe
2023-05-25T07:58:10
for example,... to get my forms to talk to each other, I use public var's in the user session instead like...
FSomeFormVar1 := TsomeForm.Create( WebApplication );
2023-05-25T07:58:26
then i have to add code when it is destroyed....
FSomeFormVar := nil ;
2023-05-25T07:58:52
then inbetween i use code to communicate with the form...
Usersession.FSomeFormVar.SomeFormObject (etc) := somevalue.
2023-05-25T07:59:26
Do you know if in the first line of the PrintReport procedure (CGIModuleName := TIWAppInfo.GetAppPath + '..._) I should be replacing CGIReport.exe with my application name?;
2023-05-25T07:59:29
normally i would have used the form variable that is built in with the actual form, but i use a step higher. I use a public variable declared in the usersession area instead.