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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 99,648
» Latest member: gs29vncom
» Forum threads: 2,426
» Forum posts: 11,373

Full Statistics

Online Users
There are currently 1104 online users.
» 1 Member(s) | 1100 Guest(s)
Applebot, Bing, Google, gs29vncom

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: 365
WebApplication.IP change ...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
09-21-2026, 05:31 PM
» Replies: 2
» Views: 405
Hook/callback to handle t...
Forum: IntraWeb General Discussion
Last Post: Lenfors
09-08-2026, 09:03 AM
» Replies: 0
» Views: 311
The packages IW16.xx inc...
Forum: IntraWeb General Discussion
Last Post: hsbelli
09-03-2026, 11:46 AM
» Replies: 2
» Views: 653
Redirection issues with F...
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 10:03 AM
» Replies: 0
» Views: 381
Source Code
Forum: IntraWeb General Discussion
Last Post: magosk
08-31-2026, 08:11 AM
» Replies: 3
» Views: 824
TContenthandler requires ...
Forum: IntraWeb General Discussion
Last Post: valmeras
08-30-2026, 02:35 AM
» Replies: 0
» Views: 337
TIWjQDBGrid erratic behav...
Forum: IntraWeb General Discussion
Last Post: alex.trejo@tttnet.com.mx
08-20-2026, 05:12 PM
» Replies: 8
» Views: 2,528
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
08-19-2026, 03:21 PM
» Replies: 1
» Views: 501
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 1,226

 
  IdTcpServer Kick Client (Disconnect) INVALID HANDLE Exception
Posted by: 3ddark - 06-17-2020, 05:58 PM - Forum: Indy - Replies (3)

Hello everybody,
I have a TCP Server application as ConsoleApp. Sometimes i need Disconnect to some client/s. I use like this code in main loop.
But I get an error after Disconnect  ----> INVALID HANDLE

I gues(probally) after disconnect then lost thread handle.

How to solve this issue

Code:
var
  LList: TList;
  n1: Integer;
begin
  while True do
  begin
    Sleep(1);

    LList := IdTCPServer1.Contexts.LockList;
    try
      for n1 := 0 to LList.Count-1 do
        if TIdContext(LList[n1]).IsKickedClient then
          TIdContext(LList[n1]).Connection.Disconnect;
    finally
      IdTCPServer1.Contexts.UnlockList;
      LList := nil;
    end;
  end;
end;

Print this item

  upload image with php file
Posted by: Madammar - 06-17-2020, 05:05 PM - Forum: Delphi General Discussion - Replies (2)

i have this uploading php script 

Code:
<?php

/* Check if file already exists in location file save */
$fdirectory  = "uploads/";
if (!file_exists($fdirectory)) {
die('You Need To Create uploads Folder before start uploading..<br> <b>Dont Forget To Give Premission 777 To the Folder</b>');
}


if (isset($_POST['upload'])) {

$imgsize = $_FILES['image']['size'];
$image_name = $_FILES['image']['name'];
$image_tempname = $_FILES['image']['tmp_name'];
$image_type = getimagesize($image_tempname);
$image_ext = explode('.',$image_name);
$ext = strtolower(end($image_ext));
$FileError = $_FILES['image']['error'];
$allow_ext = array('png','jpg','gif','jpeg','bmp');
$allow_type = array('image/png','image/gif','image/jpeg','image/bmp');

if (in_array($ext, $allow_ext) && in_array($image_type['mime'], $allow_type)) {
    
if ($FileError === 0) {
    
if ($imgsize < 300000) {

list($width, $height, $mime) = $image_type;

if ($width>0 && $height>0) {

#do Upload
$NewImageName = uniqid('', true).".".$ext;
$moveImg = $fdirectory.$NewImageName;

$upload = move_uploaded_file($image_tempname, $moveImg);

if ($upload) {
header("Location: imgup.php?img=".$moveImg ."");
exit;    
} else {
header("Location: imgup.php?res=failed");
exit;    
} # end check if uploaded

} else {
header("Location: imgup.php?res=error");
exit;    
}# image width check

} else {
header("Location: imgup.php?res=large");
exit;    
    
} # File size check end
    
    
} else {#FileError

header("Location: imgup.php?res=error");
exit;        

}

} else { # end of sec check

header("Location: imgup.php?res=error");
exit;    
    
}

/* isset check end*/
}
?>


and i am using httpclient to post the file to  php like following


Code:
HttpClient := THTTPClient.Create;
try

HttpClient.AllowCookies := True;
HttpClient.UserAgent := sUserAgent;
HttpClient.HandleRedirects := True;
HttpClient.MaxRedirects := 3;
HTTPClient.ConnectionTimeout := 0;
HTTPClient.ResponseTimeout   := 0;


PostData := TIdMultipartFormDataStream.Create;
try

try
PostData.AddFile('image', FFileToUpload);
HttpResponse := HttpClient.Post(FdataURL, PostData);
FoutData := HttpResponse.ContentAsString();
except
end;

finally
PostData.Free;
end;




finally
HttpClient.Free;
end;


but the image doesnt seems to get uploaded and i get an empty response 

what i am doing wrong ?

in html it works fine 
Code:
<form action="upload.php" method="post" enctype="multipart/form-data">
 
<div class="form-group file-area">
 
    <input type="file"  accept="image/*" name="image" id="images">
  </div>
 
 
  <div class="form-group">
    <button type="submit" name="upload">Upload image</button>
  </div>
 
</form>

Print this item

  Where can I find IWClassesFix.pas
Posted by: r.lanzhammer@web.de - 06-17-2020, 12:31 PM - Forum: IntraWeb General Discussion - Replies (1)

My software runs without problems with IW 15.1.22.
With IW 15.2.3 there is a problem with TIWForm.Dispose when changing pages. The debugger looks for IWClassesFix.pas and does not find it in the sources of IW 15.2.3.


Where can I find this file?

Print this item

  Oauth2 - Authentication with IW
Posted by: joelcc - 06-16-2020, 10:06 PM - Forum: IntraWeb General Discussion - Replies (4)

I am needing to connect an existing Intraweb application to an identity server using Oauth2.

Does anyone have any suggestions on how to do this?

Print this item

  When the user's session ends I wanted it to be automatically directed to the system's
Posted by: willmom - 06-16-2020, 02:05 PM - Forum: IntraWeb General Discussion - Replies (2)

Hi,

I am new to IntraWeb, please, if someone can help me on the following question:

When the user's session ends (SessionTimeout from ServerController) I wanted it to be automatically directed to the system's home page, which in my case is the Login screen ("/ $ / start"), or instead of the English page "Session" appearing is invalid | The specified session does not exist | Error message: Session ID is invalid. | Click here to start a new session of ... "This page has been translated Portuguese or could change this page.


I tried to search (Google) several places on how to do this and I didn't find ... Undecided



Thanks for listening.

Print this item

  Quando a sessão do usuário terminar queria que fosse direcionado automaticamente
Posted by: willmom - 06-16-2020, 01:57 PM - Forum: IntraWeb Dúvidas Gerais - Replies (2)

Olá,

Sou novo no IntraWeb, por favor, se alguém puder me ajudar na seguinte questão:

Quando a sessão do usuário terminar (SessionTimeout do ServerController) queria que fosse direcionado automaticamente para página inicial do sistema que no meu caso é a tela de Login ( "/$/start" ), ou em vez de aparecer a página em inglês "Session is invalid | The specified session does not exist | Error message: Session ID is invalid. | Click here to start a new session of ..." essa página estive traduzida português ou pudesse alterar essa página.

Tentei buscar (Google) diversos lugares de como fazer isso e não encontrei... Undecided


Obrigado pela atenção.

Print this item

  Session and temp files
Posted by: joel - 06-15-2020, 12:18 AM - Forum: IntraWeb General Discussion - Replies (1)

Is there a way to require a valid session_id before any item in the cache (/$/temp/........somefile) can be accessed?

Print this item

  Content handlers
Posted by: dbrain23 - 06-13-2020, 11:55 PM - Forum: IntraWeb General Discussion - Replies (1)

I am currently developing a multi-form app using templates. In my master template, I've got the following:

<div class="vertical-menu">
  <a href="/dashboard/">Dashboard</a>
  <a href="/profile/">Profile</a>
  <a href="/leaves/">Leaves</a>
</div>

In my ServerController under the initialization section:

initialization
  TIWServerController.SetServerControllerClass;
  THandlers.Add('', '/dashboard/', TContentForm.Create(TDashboardForm));
  THandlers.Add('', '/profile/', TContentForm.Create(TProfileForm));
  THandlers.Add('', '/leaves/', TContentForm.Create(TLeavesForm));

1. Would this be a better approach compared to explicitly creating the form? 
2. When the TContentForm.Create(<formclass>) is called, does it release the previously-opened form?
3. Is the TContentForm.Create(<formclass>) instantiated in the context of the UserSession?

Hope this makes sense.

Print this item

  Fulgan OpenSSL libraries : prohibited access
Posted by: controlhorus - 06-12-2020, 11:10 PM - Forum: Indy - Replies (7)

Hello

I updated my Delphi 2009 from Indy 10.2.5 to Indy 10.6.2.0
I am using OpenSSL libraries version 1.0.2o.
I have tried to access https://indy.fulgan.com/SSL/Archive/ and I get this error:
You don't have permission to access /SSL/Archive/ on this server.
Are rhe dlls available on any other site?

My initial problem:
I have been using these libraries to connect to several servers.
Now I am trying to connect to a new https site who gives me Connection reset by peer on SSL Client hello packet sended.
I forced TLSv1.2 and CipherList only with the Cipher Postman uses, but it still does not work.

Thanks and good health 

Print this item

  How to Format IWEdit
Posted by: Rolphy Reyes - 06-12-2020, 02:51 PM - Forum: IntraWeb General Discussion - Replies (4)

Hi!

Since IW 15.1.11 the IWEdit acquired many features by the new property DataType.  This property has the stDate as option.

How can I ensure the format of the IWEdit?

I would like that the IWEdit always has the date format 'dd/mm/yyyy' no matter the browser or dispositive the user use to open the application.

How can I achieve that?

Print this item