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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 98,474
» Latest member: ttg88vipto1
» Forum threads: 2,426
» Forum posts: 11,371

Full Statistics

Online Users
There are currently 1435 online users.
» 4 Member(s) | 1428 Guest(s)
Applebot, Bing, Google, 789club1cheap, Chapcanhmarketingcom, luckywin247site, zbetph

Latest Threads
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: MJS@mjs.us
09-11-2026, 09:49 PM
» Replies: 1
» Views: 237
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 192
Reproducible IIS crash in...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-08-2026, 01:48 AM
» Replies: 0
» Views: 202
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 507
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 259
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 676
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 240
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,289
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 381
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 1,016

 
  Writing data directly to socket from TIdHttp to TIdHttpServer
Posted by: Ahmed Sayed - 04-27-2022, 01:59 PM - Forum: Indy - Replies (5)

Hi,

I mentioned before in a previous thread that I am in the process of creating a Push notification service Client/Server. I am almost finished except for that I want to keep track of user status on client machines and update the service on the server side with this status. For example, if the user is logged in/out of our system, Busy with a task or not and if the PC is locked.

Now, I want to write directly from TIdHttp client to an TIdHttpServer but http servers in indy does not implement the OnExecute event handler like TCP servers do.

I don't want to get into the process of adding another TCP server on the push service because it will damage the structure of that type of server we have. It is similar to RAD server where the actual resource is inside a dll and the host app (server) only has 1 http server.

We can add a TCP server inside the dll resource itself but I don't want to have 2 connections from the same client just for the sake keeping track of user status. 

So, my questions are:

If I put a TCP server in the dll resource, is there a way to redirect the http connection from the client made with the http server (host app) to the TCP server inside the dll?

If I didn't use the TCP server inside the dll. Can expose the "OnExecute" event handler from TIdHttpServer? I want to be able to use TIdHttp.WriteRFC from the client side and read that on the server side. I don't want to use POST/PUT http requests for updating users status, I want this to use the minimum amount of data possible when send status pings to the push server.

I hope I demonstrated the full issue because I won't be able to share any code it is a very big project and also I am not allowed to.

Any help will be appreciated.
Thanks in advance

Print this item

  Browser back button
Posted by: JuergenS - 04-26-2022, 11:02 AM - Forum: IntraWeb General Discussion - Replies (6)

Hi,

Intercepting of the browser back button only works sporadically in IW 15.2.53, mostly not at all.

I used the following settings for the server controller, which have always worked so far:

BackButtonOptions->Mode   = bmInterceptForm;
BackButtonOptions->ShowMessage    = true;
BackButtonOptions->WarningMessage = L"Please use the back button of the application";
BackButtonOptions->ReloadPage    = false;


Regards
JuergenS

Print this item

  API BindCommerce
Posted by: staff@ergosoft.it - 04-20-2022, 11:16 AM - Forum: Indy - Replies (4)

Hi,
I need to connect a application (delphi 11) with API web service of bindcommerce (https://www.bindcommerce.com/it/guide/ap...t-prodotti)

this is an examples in php of autentication:

<?php
ini_set('display_errors', true);
error_reporting(E_ALL);


$strXml = file_get_contents(__DIR__.'/Products.xml');

$curl = curl_init();
curl_setopt_array($curl, array(


CURLOPT_URL => "https://miohost.bindcommerce.cloud/integrator-tool/api/products.php?connector=N",
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_VERBOSE => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $strXml,
CURLOPT_HTTPHEADER => array(

"cache-control: no-cache",

"content-type: text/xml",

"token: 0435a03b361d7cc24fc1acacdeaae1d7"

),
));

$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}

How in delphi ?
thanks

Print this item

  Best way to come back to an active session
Posted by: joelcc - 04-19-2022, 05:34 PM - Forum: IntraWeb General Discussion - No Replies

I need to make a call to another application and then return to my current session in my intraweb application without starting a new session.

Does anyone know the best way to do this?

Also,  Is there good documentation on how the TiwautherEvent works?

Print this item

  Disconnected TCPServer thread won't terminate
Posted by: kbriggs - 04-17-2022, 02:37 AM - Forum: Indy - Replies (12)

I'm having an issue trying to terminate Indy threads from rogue connections on my game server's TCP port which I use for a WebSocket connection. In the OnConnect event I read headers required to establish a valid websocket and I have ReadTimeout set to 10000 so it doesn't get stuck there from bots that are just probing the port. If I get valid headers I assign an object to AContext.Data, otherwise I just Exit and disconnect them in the OnExecute event. I use madExcept's NameThread command along to way to track the progress of the connection. Here is my OnExecute event:

Code:
class procedure WSServerEvents.OnExecute(AContext: TIdContext);
var st: string;
begin
  Sleep(10);  // prevent CPU max
  try
    if Assigned(AContext.Data) = False then
    begin
      MadExcept.NameThread(GetCurrentThreadID, 'WebSocket Rogue (' + AContext.Binding.PeerIP + ')');
      AContext.Connection.Disconnect;  // rogue connection
    end else
    begin
      if TConnectRec(AContext.Data).isAdmin then AdminSessionExecute(AContext)
      else PlayerSessionExecute(AContext);
    end;
  except
    on E: Exception do
    begin
      if E is EIdException then raise else
      begin
        LogData.AddError('WSServerExecute error: ' + E.Message);
        st := StringReplace(madExcept.GetCrashStackTrace, #13#10, ' - ', [rfReplaceAll]);
        LogData.AddError('WSServerExecute stack trace: ' + st);
        raise;
      end;
    end;
  end;
end;

Notice I update the thread name right before disconnecting.  And they do disconnect because when I run TCPView on my server, no one is connected to me. But those rogue threads never terminate and they build up over time and never stop unless I take the game server offline. And I know they don't terminate because my app has a function that retrieves all the live threads assigned to my app. I then use madExcept's GetThreadName command to get the names I assigned to them. Here's what that looks like:

   

Most of those IPs are from Russia. Why are these threads not terminating after the disconnect?

By the way, this is my OnDisconnect event, which should just Exit immediately for these rogue connections:

Code:
class procedure WSServerEvents.OnDisconnect(AContext: TIdContext);
begin
  if Assigned(AContext.Data) = False then Exit;
  try
    if TConnectRec(AContext.Data).isAdmin then AdminSessionDisconnect(AContext)
    else PlayerSessionDisconnect(AContext);
  except
    on E: Exception do
    begin
      if E is EIdException then raise else
      begin
        LogData.AddError('WSServerDisconnect error: ' + E.Message);
        raise;
      end;
    end;
  end;
end;

Print this item

  JQGrid AsyncLinkClick don't distinguishes between columns.
Posted by: Blanca80 - 04-14-2022, 04:48 PM - Forum: IntraWeb General Discussion - Replies (2)

Hello, 

A JQGrid with several columns wich two of them are links. The event AsyncLinkClick on the grid is described as 

Code:
procedure TForm.JQGridAsyncLinkClick(Sender: TObject; EventParams: TStringList; const RowID: string; const Row, Col: Integer);


The parameter rowid gives the information of rowno, that is correct. The Row and Col parameters gives -1 always, that is not correct. The column links are in the same row and there's no way to distinguish which column has been origined the event...

Thank you

Kind Regards

Blanca

Print this item

  Indy worker threads
Posted by: kbriggs - 04-14-2022, 12:22 AM - Forum: Indy - Replies (2)

I'm using TIdHTTPServer and TIdTCPServer components in a Delphi game server app (actually a Windows service app). Does Indy create additional threads beyond what it gives to each individual connection?  If so, is there any way for my app to fetch their ThreadID numbers during runtime?  I ask because I'm presenting a list of active threads and what they are doing. I can of course track the ones I created myself and use the Indy OnConnect/OnDisconnect events to add/remove the connection threads to/from my list. But my list is usually about 16 short of the total that Windows says belong to my app. I'm sure most of those are Windows kernal threads or Delphi worker threads present in all apps but I'd like to narrow down the "unknown" count to as small a number as possible.

Print this item

  Intraweb documentation
Posted by: JuergenS - 04-13-2022, 01:47 PM - Forum: IntraWeb General Discussion - Replies (3)

Hi ATOZED,  I have the following question:

Will there be a comprehensive, professional online user manual and an online reference manual for the new version 17 right from the start and not just the year-long reference "work in progress"?
I know that the creation of documentation is always a tiresome topic for software developers and I suffer with you.

But for the application developer, especially for newcomers, documentation is an important aid for familiarization as well as for day-to-day work.
It is certainly also important that documentation should present a topic from the point of view of the application developer and not from the point of view of the framework developer.

Today's software developers are expected to be able to quickly familiarize themselves with a new software environment and then work efficiently with it without much help.
However, no software environment is so self-explanatory that this would be possible without additional documentation.

Current operational problems can be clarified via the ATOZED user forum, which really does an excellent job.
However, the forum is not suitable as an essential source of information because it requires constant and, above all, lengthy observation and only addresses certain topics.
The many examples are certainly a great help, but they do not cover all aspects of a topic and are therefore not suitable as the sole source of information.

Previously I was not a friend of software update subscriptions for various reasons, but today I think that this not only benefits the quality of software development, but also the creation and improvement of documentation.

While the quality of the intraweb software has improved significantly in my opinion over the last few years, the same cannot be said of the documentation.
In the ATOZED forum there is actually nothing useful anymore in terms of documentation, even the ancient IW14 documentation has disappeared.

I wrote this post because I think that many intraweb users are interested in good quality documentation and I would be happy if as many users as possible would also comment on this topic.

Regards

JuergenS

Print this item

  Tab Control Errors
Posted by: brycel - 04-12-2022, 10:10 PM - Forum: IntraWeb General Discussion - Replies (2)

Intraweb 15 TabControl problem

I am using Intraweb 15.2.53 with Bootstrap and I am having stability problems with faulty rendering of Tab Controls and Tab Pages. When I click on some tabs, the previous pages will not be removed from the browser and the new pages appear in italics below the previous page.  I have some 30 pages overall in my application, spread over some 5 tab controls.  Is this a known bug?  I am compiling to Windows 32. When I compile to Windows 64 it crashes upon creating the relevant for with the following message "Access violation at address 00000000005F1746 in module 'MyAppServer.exe'. Read of address FFFFFFFFFFFFFFFD".

Within the developer tools of the browser I also get this "(index):34 Uncaught ReferenceError: $ is not defined at (index):34:1".

When I run the 32 bit version, which DOES load and not crash, I get the above error as well as this additional error in the rendered source code: "Uncaught SyntaxError: Private field '#top' must be declared in an enclosing class"

If anyone can shed some light on these errors that would be very much appreciated.


Thanks,  Bryce

Print this item

  Server side control of resource (html or image files) access
Posted by: giorgio_c - 04-12-2022, 07:48 AM - Forum: IntraWeb General Discussion - Replies (3)

I've this scenario:
1) user connect to IW server and a new session is started. The IW server return the main page with an HTML template including login fields.

2) user complete the login form and login with async event.
In CallBack function response the JS function getInfo() is called:

Code:
function getInfo() {
        $.get("img/item.html", function( my_var ) {
          $("#appInfoContent").html(my_var);
        });       
      }

This function load a resource (maybe html file or images etc..) and put it in an element.

My question is: how can i control server side the access to the resource file?
Server side have to check if user i logged or not, and if not logged it have to deny the "img/item.html" resource.
 
Many thanks.

Print this item