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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 98,107
» Latest member: bpexchspace
» Forum threads: 2,426
» Forum posts: 11,371

Full Statistics

Online Users
There are currently 1326 online users.
» 3 Member(s) | 1320 Guest(s)
Applebot, Bing, Google, bpexchspace, nova88tipss, sparktechnology

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

 
  SessionID invalid
Posted by: etwoss - 05-18-2019, 10:00 AM - Forum: IntraWeb General Discussion - Replies (3)

Hi

One of the most errors i found in my errorlog is "SessionID" invalid.
What can i do to solve these kind of problems?

Eric

Print this item

  Double click
Posted by: etwoss - 05-18-2019, 09:58 AM - Forum: IntraWeb General Discussion - Replies (4)

Hi

My users are not the most brilliant ones Smile , in stead of clicking a button once the often doubleclick.

What is a good strategy to handle these doubleclick?


Eric

Print this item

  POST returns EIdOSSLCouldNotLoadSSLLibrary
Posted by: pete@pdmagic.com - 05-16-2019, 06:00 PM - Forum: Indy - Replies (2)

Hi there!  Hope whoever reads this is having a great day!

I've got an Intraweb app that serves up a REST interface.  I've also got a Delphi desktop app that consumes the Intraweb apps' REST interface using Indy.  I've had it all working both locally and installed as an ISAPI for a while now.  ...Until I directed IIS to force all requests to https.  The Intraweb app works fine under https. But the desktop app started complaining EIdOSSLCouldNotLoadSSLLibrary.  Interestingly, another desktop app (in c#) needed no modifications and has continued to run fine, now accessing the https REST URL.

In fact, here is a live URL: https://dev.governmenttools.com/alpha/cm.../VersionNH
My client code for making the REST call (POST) is below.

So far I haven't done *anything* to the desktop app.  I haven't added any DLLs to its path, I haven't changed any code to have it use https, nothing.  So here are my questions:
1. Assuming a working non-ssl desktop app, what changes need to be made to support SSL?
2. My desktop app, used for data entry, is currently just a single .exe.  I'd love to keep it that way.  Is there any way to bundle the functionality needed into the .exe?  I'm not beyond adding the dlls as a resource and extracting them before dynamically loading them. Otherwise, I'll need to create an installer.
3. In searching on the web, I see other programmers writing SSL specific Indy code when connecting to https.  Is this necessary?  From my limited experience, Indy seems to be identifying that it wants to do SSL, but looking for those dll's most likely.
4. Any suggestions?  (that's carte blanche to criticize my strategy if you feel so inclined)  Tongue

Thanks,
Pete




Code:
function TpdHTTPClient.Post( aName        : string;
                             aServiceURL  : string;
                             aParams      : TStringList ) : string;
var lHttp :TIDHttp;
    lRequestStream, lResponseStream : TStringStream;
begin
  lHttp := TIDHttp.Create(nil);
  try
    ConfigureHttp( lHttp );
    result := lHttp.Post( aServiceURL, aParams );
  finally
    lHttp.Destroy;
  end;
end;

procedure TpdHTTPXMLClient.ConfigureHttp(aHttp: TIDHttp);
begin
  inherited;
  aHTTP.Request.ContentType := 'application/x-www-form-urlencoded';
//  aHttp.Request.ContentType := 'application/xml';
end;

Okay, as my daughter would say - "my bad". Sorry about that.

I could have at least tested the .dll's.  I added the dll's to the .exe directory and everything works fine.  
So the question is more simple - how to pack into .exe, and any other suggestions?

Thanks for your time.

Print this item

  Calling openssl from x64 application
Posted by: KeesVer - 05-16-2019, 12:13 PM - Forum: Indy - Replies (7)

Hello,

I'm calling openssl from Delphi (10.3.1) using the indy libraries. This works perfectly when using a 32 bit application. However when the application is compiled to 64 bits, I get an access violation on this line: rc := EVP_PKEY_set1_RSA(@key, FRSA);

I use dll's copied from https://indy.fulgan.com/SSL/

Any idea what is causing this?

I have attached a test application but you'll need a private key to use it (I can send a temporary key when needed)

Thanks,

Kees

Code:
function TOAuth1SignatureMethod_RSA_SHA1.Hash_HMAC_SHA1(const AData, AKey: string): string;
var
 buffer: TBytes;
 clean_key: string;
 mdLength: TIdC_UInt;
 mdctx: EVP_MD_CTX;
 outbuf: TBytes;
 KeyBuffer: pBIO;
 FRSA: PRSA;
 md: PEVP_MD;
 rc: Integer;
 key: EVP_PKEY;
 p: Integer;

begin
 if not IdSSLOpenSSL.LoadOpenSSLLibrary then
   raise Exception.Create('LoadOpenSSLLibrary failed');

 // Load private key (key must include header and footer)
 //-----BEGIN PRIVATE KEY-----
 // ....
 // ....
 //-----END PRIVATE KEY-----

 p := AKey.IndexOf('-----END PRIVATE KEY-----');
 if p < 0 then
   raise Exception.Create('Private key error');

 clean_key := AKey.Substring(0, p + Length('-----END PRIVATE KEY-----'));
 buffer := TEncoding.ANSI.GetBytes(clean_key);
 KeyBuffer := BIO_new_mem_buf(buffer, Length(buffer));

 if KeyBuffer = nil then
   raise Exception.Create('RSA out of memory');

 try
   FRSA := PEM_read_bio_RSAPrivateKey(KeyBuffer, nil, nil, nil);
   if not Assigned(FRSA) then
     raise Exception.Create('Private key error');
 finally
   BIO_free(KeyBuffer);
 end;

 md := EVP_get_digestbyname('SHA1');

 rc := EVP_DigestInit(@mdctx, md);
 if rc <> 1 then
   raise Exception.Create('EVP_DigestInit failed: ' + rc.ToString);

 rc := EVP_PKEY_set1_RSA(@key, FRSA); <== Exception occurs here
 if rc <> 1 then
   raise Exception.Create('EVP_PKEY_set1_RSA failed: ' + rc.ToString);

 rc := EVP_DigestSignInit(@mdctx, nil, md, nil, @key);
 if rc <> 1 then
   raise Exception.Create('EVP_DigestSignInit failed: ' + rc.ToString);

 buffer := TEncoding.ANSI.GetBytes(AData);
 rc := EVP_DigestSignUpdate(@mdctx, buffer, Length(buffer));
 if rc <> 1 then
   raise Exception.Create('EVP_DigestSignUpdate failed: ' + rc.ToString);

 rc := EVP_DigestSignFinal(@mdctx, nil, @mdLength);
 if rc <> 1 then
   raise Exception.Create('EVP_DigestFinal failed: ' + rc.ToString);

 SetLength(outbuf, mdLength);
 rc := EVP_DigestSignFinal(@mdctx, PIdAnsiChar(@outbuf[0]), @mdLength);
 if rc <> 1 then
   raise Exception.Create('EVP_DigestFinal failed: ' + rc.ToString);

 //EVP_Cleanup();
 Result := TNetEncoding.Base64.EncodeBytesToString(outbuf);
 Result := Result.Replace(#13#10, '', [rfReplaceAll]);
end;



Attached Files
.zip   RESTDemo.zip (Size: 99.23 KB / Downloads: 8)
Print this item

  IWComboBox with Bootstrap style? How?
Posted by: ioan - 05-16-2019, 06:59 AM - Forum: IntraWeb General Discussion - No Replies

I tried "dropdown", "dropdown-menu" and doesn't work. Do I have to build the Combobox in code with "OnUnknownTag" to make it look good or there is a simpler way?

Found it, it's "form-control"

Print this item

  Client IP changing breaking security
Posted by: bob9999 - 05-12-2019, 09:03 PM - Forum: IntraWeb General Discussion - Replies (4)

Hi there.  I received a report of someone on the new Galaxy10 cell phone that is getting an error that the IP address is changing and they cannot establish a connection.  I had this once with an iPhone too.

My whole application is in SSL and the error message is "The IP you are using is different than the one that initiated the session.   Security check failed.  Please restart application."

Is there a way to loosen the security of the web application to allow the IP address to dynamically change?  I read on-line that the new Galaxy 10 has networking issues so this is probably a flawed product but I wanted to ask the technical question if we can do anything to compensate for this problem.

Cheers!



Attached Files Thumbnail(s)
   
Print this item

  Decode Base64 into Memo or file
Posted by: staff@ergosoft.it - 05-11-2019, 09:00 AM - Forum: IntraWeb General Discussion - Replies (11)

Hi,

I try to decode a string encoded in base64 into Memo o alternatively in a text file...

try this but not work...

Code:
var
   b : TBytes;
   testo : string;

begin
   ...
   b := TNetEncoding.Base64.DecodeStringToBytes(mystringencodedbase64);
   testo := TEncoding.ANSI.GetString(b);
   memo1.text := testo;

in memo is show symbol not my original string ....

thanks
Alessandro Romano

Print this item

  Tcontent Handler and notify errors to frontend
Posted by: cprmlao@hotmail.com - 05-09-2019, 10:28 PM - Forum: IntraWeb General Discussion - Replies (2)

I have a javascript code on frontend, where I call a content handler.  

When using TcontentHandlers, if the handler fail I need to inform the front end that an error occur.
The response of the handler is something as 

Code:
aReply.WriteString(here is the result);


But if there is an error, such as "400 error" or similar , how could I inform the frontend?
What could I put in writestring?

Luiz

Print this item

  ISAPI dll, IIS and exceptions
Posted by: msgopala - 05-09-2019, 05:02 PM - Forum: IntraWeb General Discussion - Replies (1)

Embarcadero® Delphi 10 Seattle Version 23.0.20618.2753 
Intraweb 15.0.14
TMS pack Pro
FastReport 5

The dll has been running on the serv er since April 20th with a few TMS component issues. Apart from that after there is one issue, there are sites trying to access files which are not where the dll is published resulting in 404 error and one of the dlls, which is an older isapi dll going down, which causes a domino effect. 

How can I stop this from happening. I have a robots.text in the same folder as the dll and have User-agent: * Disallow/ inside it. 


Thanks
* I tried googling before posting here and came up with nothing.

Print this item

  IW 15.0.21 vs RAD C++ 10.2 update 3
Posted by: duffo64 - 05-09-2019, 03:21 PM - Forum: IntraWeb General Discussion - Replies (4)

Sirs,

After 15.0.21 installation, as soon as I recompile an existing project (or create and run a new empty one) it fails:

Exception message : Error reading IWForm1.Width: Access violation at address 00B91998 in module 'Intraweb_15_D10_2.bpl'. Read of address 00000008
Exception class : EReadError

P.S.: trying an empty project with RAD C++ 10.3 update 1 works as expected

What happened ?_?

/Claudio

Print this item