Good afternoon.
I write for possible errors on the Bootstrap library.
I have attached an example project.
1)
I have an iwbsinputform with iwbsfile and an iwbsbutton inside it. I put the ButtonType property btsubmit. The onsubmit event with this code is associated with the iwbsinputform:
if aRequest.Files.Count> 0 then
begin
FileUpload: = THttpFile (aRequest.Files [aRequest.Files.Count - 1]). FileName;
WebApplication.ShowMessage ('File upload name:' + FileUpload);
end
else
WebApplication.ShowMessage ('No file selected');
After executing this code I get the error 404 - Not found. I think it's two to the rewriting of the iwbsrestserver.pas unit and the change in the management of callbacks in Intraweb 15.1.4.
2) In the iwbsradiobutton component the OnAsyncClick event does not fire and the Checked property when it changed is always False if I try to read it from code.
3) HiddenInput
I have a callback registered in the form
WebApplication.RegisterCallBack ('CalcolateValue', CalcolateValue);
In a CalcolateValue procedure:
js: = Format ('addHiddenInput ("% s",% s);', ['Test_Input', 'Test ()']);
WebApplication.CallBackResponse.AddJavaScriptToExecute (js);
In a button in the scriptevents property I have
ajaxCall ("CalcolateValue", "& CallBack = 1", false);
and in the AsyncCLick event I have:
Value: = EventParams.Values ['Test_Input'];
WebApplication.ShowMessage (Value);
When I run ajaxcall the callback is executed but then in the button in the AsyncClick event the Value returned is always empty and not 5 as it should be. (In the same button is it possible to return the value of the variable through the callbak?)
(I use intraweb 15.1.4 and iwbootstrap 3.4.1)
Thanks for your help
Hallo,
when a user of my IW application exits the browser I know that, after 20 minutes, the user usersession is destroyed. In my personal log I see that DM is freed etc.
Your Session Log viewer shows: Created at: 07/09/2019 11:42:44
Destroyed at: The session was still active when this file was last written to. Remote IP address: 37.159.85.203 Browser name: Chrome Mobile Browser user agent string: Mozilla/5.0 (Linux; Android 7.0; BAH-L09) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 Duration: 1 day 21 hours 40 seconds Request count: 47 Last Access: 07/09/2019 11:46:51 This session should be expired!
After this event, new sessions are created but not started ulnti servive is terminated ans started.
For every new Your Session Log Wiewer shows: Created at: 07/09/2019 18:44:12 Destroyed at: The session was still active when this file was last written to. Remote IP address: 188.216.208.23 Browser name: Chrome Mobile Browser user agent string: Mozilla/5.0 (Linux; Android 8.1.0; SM-T585) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36 Duration: 1 day 13 hours 59 minutes 11 seconds Request count: 1 Last Access: 07/09/2019 18:44:12 This session should be expired!
Only one event ( "Created") is whowed for the session
I am using IW 15.1.4 and dont kow if this was happening in IW 14...
Can you suggest me on what to ckeck or how can I solve this problem?
Thank you for your time.
Best regards.
Oronzo Conte
I did a test using a button click that run this code:
Code:
procedure TIWUserSession.load_dicom();
var
CGIRunner: TIWCGIRunner;
CGIModuleName: string;
LFileName: string;
begin
CGIModuleName := TIWAppInfo.GetAppPath + 'wwwroot\cgi-bin\newweb\dgate.exe';
CGIRunner := TIWCGIRunner.Create;
try
// Set the name of the CGI module which runs our report
CGIRunner.CGIModule := CGIModuleName;
CGIRunner.CustomFields.Add('mode=top');
// call the CGI application
CGIRunner.Execute(WebApplication, WebApplication.Request);
// Check status result. Zero indicates success. Anything else is an error
if CGIRunner.StatusResult = 0 then
begin
//what I have to do here????
end else
begin
WebApplication.ShowMessage('Error creating report: ' + CGIRunner.ErrorMessage);
end;
finally
CGIRunner.Free;
end;
end;
Here is the lua script executed by "dgate.exe" cgi to produce the html output:
Code:
HTML("Content-type: text/html\nCache-Control: no-cache\n");
HTML("<HEAD>")
print [[<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">]]
HTML("<TITLE>Conquest DICOM server - version %s</TITLE>", version)
HTML("</HEAD>")
HTML("<BODY BGCOLOR='CFDFCF'>")
HTML("<H1>Welcome to Conquest DICOM server - version %s</H1>", version)
HTML("<H2>Written by Conquest Project</H2>", version)
HTML("<IMG SRC='%sconquest.jpg' ALT='Written by Conquest Project'>", Global.WebCodeBase)
HTML("<HR>")
My DSL ISP had a weird outage the last 2 days.
Accessing https sites did not work, while http worked fine. Also tls did not work like in SMTP StartTls.
I disabled StartTls and then could send emails.
I have not understood the actual reason, but took that rare opportunity to check my FMX apps.
It uses TIdHTTP accessing a https webpage
I already had set ConnectTimeout:= 2000;
but it still blocked.
Setting ReadTimeout:= 8000; helped, it timed out after 11 sec. It was always 3 sec longer than ReadTimeout.
Perfect on Windows!
But on Android ReadTimeout did not help , it still blocked forever.
I tried Berlin (Indy 10.6.2.5341) and Seattle (Indy 10.6.2.5467)
Q:
Is there a solution to get a timeout on Android?
Unfortunately I can't test this scenario anymore, my ISP now works normally again
I'm tasked with maintaining a very old Delphi XE7, IntraWeb 14 (I think.. how do I determine the IW version number installed?), OS: Windows Server 2008
The IntraWeb app is working well. It connects to a Firebird database and all the DB connection components (DAC by DevArt version 5.5.16) are in the UserSessionUnit.
My task is to allow this old app to connect to an additional Firebird database. The company is upgrading all their apps, and they all point to a new Firebird database that has a different internal table and field structure (both "old" and "new" DBs are Firebird 3x, just different tables and fields). The Intraweb app is a "helper" app, not the main one, so it must be made to bridge the gap between old and new.
I've done this before, many years ago, but forgot the best way to code this. Here is my plan:
- Leave everything that is working, alone
- With your generous help, code the few lines in the few places necessary, to create an additional datamodule for the user session.
- Copy everything from the existing working UserSessionUnit to the newly created-on-the-fly datamodule (All component names can remain the same this way, making other code adjustments easier. Only the datamodule the components and code point to, need be changed.)
- In the .ini file, put a flag that tells the IntraWeb app to use the old DB or the new one. (I'll flip this on "switch over" day from old DB to new DB) - Make adjustments in the code to point to the appropriate datamodule and thereby the appropriate DB as indicated by the parameter in the above step
Question:
- I need step by step instructions on how to add an additional data module to the IW / Delphi XE7 app, starting right from the menus in XE7, to the final coding snippets and tell me the units to put them in.
Simple bug in IW15.1.4, but very annoying.
OnAsyncClick Event:
IWGrid1.visible: = not IWGrid1.visible;
... and the position of the Grid is moving!
(The position is correct for the OnClick event.)
I am new to IntraWeb and am trying it out for the first time. However when I drop a breakpoint on the code in the Form unit it does not seem to trigger correctly. Does Intraweb support the Delphi debugger? If so does anyone have any suggestions that I may try to get that working.