Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 100,071
» Latest member: 3n3comcombr1
» Forum threads: 2,426
» Forum posts: 11,373

Full Statistics

Online Users
There are currently 797 online users.
» 0 Member(s) | 793 Guest(s)
Applebot, Bing, Google, Yandex

Latest Threads
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-21-2026, 05:33 PM
» Replies: 1
» Views: 411
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-21-2026, 05:31 PM
» Replies: 2
» Views: 457
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 339
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 695
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 403
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 886
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 363
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,603
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 535
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 1,276

 
  unable to install IW15 in XE7
Posted by: tobenschain - 09-09-2020, 11:52 AM - Forum: IntraWeb General Discussion - Replies (5)

I am unable to install IW15 on XE7. I deleted IW packeges and ran IWBundledRemovalTool.exe. I ran iw15.2.16,exe. When I start Delphi it shows IW 15 in the splash screen. But there are no components in the Tool Palette.

Print this item

  AV running demo XII/Delphi/HTMLEditor
Posted by: jeroen.rottink - 09-09-2020, 10:42 AM - Forum: IntraWeb General Discussion - Replies (3)

I was curious about the /$/iwedit feature but can't find info about it.

There are however demos using this feature:

  • XII/Delphi/HTMLEditor
  • XII/Delphi/IWWiki
After making small changes to the first project to make it compile, I get an AV hitting the button to edit the index.html file.

Should this feature still work under IW15?

Print this item

  Problem with getting session list
Posted by: martin.andersen@amesto.dk - 09-09-2020, 09:40 AM - Forum: IntraWeb General Discussion - Replies (8)

Hi!
In order to let some forms be terminated I get the session list with; gSessions.GetList(alst); as one of the last things in  the event IWServerControllerBaseNewSession() in the server control unit
But it will almost always not work the second time around, the first time is OK.
I've tried to push it to a later time, when the form is up and running (with a timer 5000), but it is the same behaviour.
Thx Martin

Code:
procedure TIWServerController.CleanUpForms(ASession: TIWApplication);
var
  alst:     TStringList;
  aid:      string;
  app:      TIWApplication;
  exp, al:  boolean;
  ok:       boolean;
  cnt:      integer;
begin

  if _LogEnabled then
    _Log('Trying to clean-up session list');

  try
    ok:=false;
    cnt:=0;
    repeat
      alst:=TStringList.Create;
      try
        gSessions.GetList(alst);
        ok:=true;
      except
        Inc(cnt);
        if cnt = 100 then begin
          if _LogEnabled then
            _Log('**Warning: Could not retrieve session list from IntraWeb platform');
          Exit;
        end;
        Sleep(50);
      end;
    until ok;

    if _LogEnabled then begin
      if cnt > 0 then
        _Log('Retry count is: ' + IntToStr(cnt));
      _Log('Number of sessions currently in the list: ' + IntToStr(alst.Count));
    end;

    for aid in alst do begin
      if aid <> ASession.AppID then begin
        app:=gSessions.LookupAndLock(aid, exp, al);
        if Assigned(app) and not exp then begin
          if app.Name = ASession.Name then begin
            if _LogEnabled then
              _Log('Session "' + app.AppID + '" will be terminated');
            app.Unlock;
            app.Terminate;
            app.Free;
          end else begin
            app.Unlock;
          end;
        end;
      end;
    end;

  finally

    alst.Free;

  end;

  if _LogEnabled then
    _Log('Number of sessions (from gSessions): ' + IntToStr(gSessions.Count));

end;

Print this item

  The visibility of variables
Posted by: Сергей Александрович - 09-09-2020, 02:52 AM - Forum: IntraWeb General Discussion - Replies (2)

Please help me. I can't figure out how to see (use) the variable described in the program in a JavaScript script. For example:

Public
mTextToPrint: String;
.....
procedure TfmViewCheck.IWAppFormShow(Sender: TObject);
begin
mTextToPrint := 'Текст для печати';
end;

язык JavaScript :
alert (mTextToPrint); - does not work

Print this item

  Get Back Button Click Event
Posted by: 41linea45 - 09-05-2020, 10:08 AM - Forum: IntraWeb General Discussion - Replies (3)

Hello

How can i know when user press back button in web browser in Intraweb 15?

How should set Back button operations in server controller and forms?

Thanks for advance.

Print this item

  The Ultimate Guide for using indy with ssl on other platforms!
Posted by: Ahmed Sayed - 09-03-2020, 08:48 PM - Forum: Indy - No Replies

I know that I discussed this before in other forums but I can't get a tutorial on how to do things exactly regarding using Indy clients with ssl. On windows it is easy but on other platforms it is a bit tricky since there are a lot of API and versions changes to android or iOS. I searched this a lot on stackoverflow or Idera forums but I can't get a step by step example.

For instance on android I know there is BoringSSL now when was it supported and on which android version OpenSSL won't work. I know that there is a away to trick the OS to load OpenSSL files for indy but this work on new android versions as well but only old versions. 

And what About linux does it use the same dlls?

Print this item

  Indy 10 + OpenSSL: error:140A90F1:lib(20):func(169):reason(241)
Posted by: ZGabrovski@gmail.com - 09-03-2020, 09:55 AM - Forum: Indy - Replies (7)

I have a problem with OpenSSL libraries (libeay32.dll and ssleay32.dll), version 1.02.u (but the same issue with older releases), Windows 64, both Embarcadero Delphi 10.3 Rio and Lazarus 2.1 (FPC 3.3.1) - from the trunk.

The problem is in my multi-threading application, which uses TIdHTTP.Get() for consuming data from a REST api (using SSL/TLS) and picture download function:

Code:
begin
  Result := TMemoryStream.Create;
  Http := TIdHttp.Create(nil);
  IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
  IOHandler.SSLOptions.SSLVersions := [sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2];
  Request := TIdHTTPRequest.Create( Http );
  Request.UserAgent := UserAgent;

  HTTP.Request := Request;
  HTTP.IOHandler := IOHandler;

  try
    try
      ii := 0;
      repeat
        Result.Position := 0;
        Http.Get(AURL, Result);
        Result.Position := 0;
        Result.read( Buffer, 20 );
        Inc(ii);
      until  CheckValidPicture( Buffer )or (ii>2);
      if (ii>2) then
        Result.Clear;
      Result.Position := 0;
    except
      // Just in case - second try
      try
      ii := 0;
      repeat
        Result.Position := 0;
        Http.Get(AURL, Result);
        Result.Position := 0;
        Result.read( Buffer, 20 );
        Inc(ii);
      until  CheckValidPicture( Buffer ) or (ii>2);;
      if (ii>2) then
        Result.Clear;

      Result.Position := 0;

      except
      if (ii>2) then
        Result.Clear;

      end;
    end;
  finally
    Http.DisposeOf;
    Request.DisposeOf;
    IOHandler.DisposeOf;
  end;

When I am executing the code for a first time, everything is OK.
But, on second code execution(in other thread), I received the following exception core:

Error creating SSL context:error:140A90F1:lib(20):func(169):reason(241)

in HTTP.Get method.

So after some debug in Indy sources, I found that the problem comes in execution of method "SSL_CTX_new" in unit IdSSLOpenSSL, line 3156:

Code:
  // create new SSL context
  fContext := SSL_CTX_new(SSLMethod);
    if fContext = nil then
      EIdOSSLCreatingContextError.RaiseException(RSSSLCreatingContextError);
  end;

  //set SSL Versions we will use

After some google research, I found this:
https://curl.haxx.se/mail/lib-2018-07/0057.html

and modify Indy code like described:

Code:
  // create new SSL context
  fContext := SSL_CTX_new(SSLMethod);
  if fContext = nil then begin
    OpenSSL_add_all_digests;
    fContext := SSL_CTX_new(SSLMethod);
    if fContext = nil then
      EIdOSSLCreatingContextError.RaiseException(RSSSLCreatingContextError);
  end;
  //set SSL Versions we will use

and now everything works fine.

Is this OK?

and if it is, how to modify Indy source code ( is there some bug tracker or whatever, to create issue)?

Print this item

  Error 1053: When starting a new service
Posted by: TiredDev - 09-02-2020, 05:03 PM - Forum: IntraWeb General Discussion - Replies (2)

We use several AWS servers, all the same configuration. On one of them we can start around 20 services with no problem. But when we try to add one more we instantly get the 

Error 1053: [i]The service did not respond to the start or control request in a timely fashion[/i] 

We've added a lengthier time out but that didn't help. Didn't think it would as the error comes up right away. Now, If I stop one of the services, and try to start the one that previously failed, it comes up just fine. So it behaves like there is a limit. AWS say they have no such limit. Plus, we have quite a few more running on other servers with no such problem.

Any ideas?


IntraWeb 14.1.14
2012 Server R2

Print this item

  Use TIdHttp inside TThread anonymous function doesn't raise exceptions
Posted by: Ahmed Sayed - 09-02-2020, 01:20 AM - Forum: Indy - Replies (6)

Hi all,

I am using a subclass of TIdHttp to expose DoRequest function. I use it in a tool similar to Rest Debugger so what I want to achieve regardless of the code because I can't show it. But I am pretty sure you will get the idea.

I use this new class inside a thread so I can handle files downloads and uploads with progress bars correctly without blocking the UI, and I do all the necessary synchronizations with the UI. My only problem is client side exceptions for example when I do a request and the server is not running nothing happens at all. Nothing is shown in the memo or as dialog message. I understand that this behaviour is because I am executing the request inside a thread. 

I want to catch any exception that was raised on the server with error code 500 inside a TMemo as long as any response message, and any exception that is not related to server side internal errors to be displayed normally in a dialog message box.

now this is not the actual code but it is similar:


Code:
__fastcall TIdHttpEx::TIdHttpEx(TComponent *Owner)
    : TIdHTTP(Owner)
{
HTTPOptions = TIdHTTPOptions() >> hoWantProtocolErrorContent;
FHTTPBody.reset(new TIdHTTPBody);
FHTTPBody->IdHTTP = this;

FHasErrorResponse = false;
FRaiseExceptionOn500 = true;
FLastErrorResponse = "";
}
//---------------------------------------------------------------------------
int __fastcall TIdHttpEx::DoExecute(String AMethod, String AURL, TStream* AResponseContent, TStream* ARequestContent)
{
try
    {
    FHasErrorResponse = false;
    FLastErrorResponse = "";

    if (FHTTPBody->RequestStream == nullptr && ARequestContent != nullptr)
        FHTTPBody->RequestStream = ARequestContent;

    if (FHTTPBody->ResponseStream == nullptr && AResponseContent != nullptr)
        FHTTPBody->ResponseStream = AResponseContent;

    if (FHTTPBody->ResponseStream == nullptr && AResponseContent == nullptr)
        FHTTPBody->ResponseStream = new TMemoryStream;

    DoRequest( AMethod, AURL, FHTTPBody->RequestStream, FHTTPBody->ResponseStream,nullptr,-1);

    FResponseOk = (ResponseCode == 200);

    if (FHTTPBody->ResponseStream != nullptr)
        FHTTPBody->ResponseStream->Position = 0;
    }
catch (const EIdHTTPProtocolException &E)
    {
    if (FRaiseExceptionOn500)
        throw Exception(E.ErrorMessage);
    else
        {
        FLastErrorResponse = E.ErrorMessage;
        FHasErrorResponse = (FLastErrorResponse.Trim() != "");
        DoHTTPErrorEvent(FLastErrorResponse);
        }
    }
catch (const Exception &E)
    {
    ShowException(&E, nullptr); //this do the trick but I don't know if it is the right thing to do
    }
}

Print this item

  Passing Delphi variables to Javascript function.
Posted by: thiagorod - 09-01-2020, 06:48 PM - Forum: IntraWeb General Discussion - Replies (4)

Hello,

I have this Javascript function (charting library) that takes an array of values as a variable, like this:

data: [22,61,64,35,91,59,62,91,124,94,77,196,309,147,102,107,199,36,0,0,0,0,0,0],

My doubt is how to make it read a Delphi array as the data input, I mean, how to transfer the values to this JS array.
Sorry if this is simple to do.

Regards,

Print this item