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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 107,449
» Latest member: sunvinonline
» Forum threads: 2,438
» Forum posts: 11,404

Full Statistics

Online Users
There are currently 1631 online users.
» 3 Member(s) | 1625 Guest(s)
Applebot, Bing, Google, abcvipcafe, sunvinonline, taj777

Latest Threads
Strict CSP Implementation
Forum: IntraWeb General Discussion
Last Post: joelcc
Yesterday, 08:28 PM
» Replies: 1
» Views: 145
Form doesn’t resize with ...
Forum: IntraWeb General Discussion
Last Post: BathDragonfly
10-29-2026, 09:48 AM
» Replies: 0
» Views: 114
Rerendering CG Tab Contro...
Forum: IntraWeb General Discussion
Last Post: MikeComb
10-29-2026, 07:38 AM
» Replies: 5
» Views: 599
Simply replacing the IW i...
Forum: IntraWeb General Discussion
Last Post: DidierMenant
10-28-2026, 10:31 AM
» Replies: 0
» Views: 191
Simply replacing the IW i...
Forum: IntraWeb General Discussion
Last Post: DidierMenant
10-28-2026, 10:30 AM
» Replies: 0
» Views: 177
IWDevTools
Forum: IntraWeb General Discussion
Last Post: AndreasK
10-26-2026, 01:19 PM
» Replies: 0
» Views: 207
SSL Revisited
Forum: IntraWeb General Discussion
Last Post: rlebeau
10-19-2026, 09:24 PM
» Replies: 3
» Views: 806
SpinBox Button Size
Forum: IntraWeb General Discussion
Last Post: MikeComb
10-19-2026, 06:12 PM
» Replies: 0
» Views: 308
CSS in CGDevTools
Forum: IntraWeb General Discussion
Last Post: MikeComb
10-13-2026, 04:12 PM
» Replies: 2
» Views: 775
Help with TIWPaintBox
Forum: IntraWeb General Discussion
Last Post: EmoPal
10-13-2026, 08:44 AM
» Replies: 0
» Views: 430

 
  Hide/Visible IWButton with template
Posted by: matija - 05-21-2019, 06:58 AM - Forum: IntraWeb General Discussion - Replies (5)

I have IWButton in my Form with RenderVisibility=true. 

This button i have defined in HTML template {%IWButton%}.

I want one time hide button in another time visible this button with Event.

IWButton.Visible:=false / IWButton.Visible:=true;

Change other property? Why not work?!

Print this item

  Encoding problems
Posted by: MikaK - 05-19-2019, 10:59 AM - Forum: IntraWeb General Discussion - Replies (10)

Hi,
I'm migraring on of our vcl apps to intraweb and run to exception "No mapping for the Unicode character exists in the target multi-byte code page". 
I understand that it something to with encoding, but how I do encode data when it comes directly from dataset trough datasource?
I'm using Delphi 10.3.1 and IW 15.0.21. At form I have tiwdbedits, tiwdbgrids
Characters are special characters like ä and ö (iso-8859-15) 

thanks
mika

Print this item

  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