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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 388
» Latest member: jdenell
» Forum threads: 536
» Forum posts: 2,535

Full Statistics

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

Latest Threads
Scroll Sync Between 3 Lis...
Forum: IntraWeb General Discussion
Last Post: kudzu
Yesterday, 03:07 PM
» Replies: 1
» Views: 19
Encoding problems
Forum: IntraWeb General Discussion
Last Post: kudzu
Yesterday, 03:06 PM
» Replies: 10
» Views: 135
Hide/Visible IWButton wit...
Forum: IntraWeb General Discussion
Last Post: matija
Yesterday, 05:11 AM
» Replies: 5
» Views: 73
Reconnect TIWimer
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
Yesterday, 04:12 AM
» Replies: 8
» Views: 342
Calling openssl from x64 ...
Forum: Indy General Discussion
Last Post: rlebeau
Yesterday, 12:20 AM
» Replies: 7
» Views: 92
HTTPS with Intraweb
Forum: IntraWeb General Discussion
Last Post: kudzu
05-23-2019, 01:51 PM
» Replies: 3
» Views: 32
cannot started service af...
Forum: IntraWeb General Discussion
Last Post: Stéphane
05-22-2019, 12:45 PM
» Replies: 4
» Views: 59
SessionID invalid
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
05-22-2019, 11:01 AM
» Replies: 2
» Views: 59
CustomContentHandler for ...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
05-22-2019, 10:55 AM
» Replies: 9
» Views: 369
Double click
Forum: IntraWeb General Discussion
Last Post: etwoss
05-19-2019, 01:17 PM
» Replies: 4
» Views: 95

 
  Scroll Sync Between 3 ListBoxes.
Posted by: jdenell - 05-23-2019, 08:08 PM - Forum: IntraWeb General Discussion - Replies (1)

I currently have 3 TIWListBox objects which I am trying to sync together. When I scroll down/up in one I want them all to scroll but I haven't had any luck finding a solution.

I am using Delphi 10.1 Berlin

Thanks in advance for any help!

Print this item

  HTTPS with Intraweb
Posted by: Orpair - 05-23-2019, 10:27 AM - Forum: IntraWeb General Discussion - Replies (3)

Hi,

I recently make a web application with Intraweb and deploy it as a Windows Service on a server.
Now I want to install SSL to have a HTTPS access. 

I look at this project : https://github.com/Atozed/IntraWeb/tree/...ndAloneSSL to see how it works but 
the secured link didn't work. (Chrome : This page of the site ... was not found /This site is inaccessible  Exception message : Secure mode is required for this form).

I add libeay32.dll and ssleay32.dll on the project folder and I use their .pem files  to test their application.
I test on 127.0.0.1 and I install it as a windows service to test with IP of my server too.
I'm on Delphi 10.2 and Intraweb 15.0.15.

Does anyone knows what is wrong ?

Thanks.

Print this item

  cannot started service after deploy http.sys application
Posted by: Stéphane - 05-22-2019, 08:01 AM - Forum: IntraWeb General Discussion - Replies (4)

i try to test Http.sys application sample "HttpSysDemo" with Intraweb 15.0.17

in DPR file :
TIWStartHSys.Execute(False);

then i deploy then HttpSysDemo1.exe as service with cmd run as administrator :
sc create HSysApp1 binPath="C:\PROJETS\\Intraweb\Samples\15\Delphi\HttpSysDemo\App1\Win32\Debug\HttpSysDemo1.exe"

When i try to start the service in the previous cmd windows with :
net start HSysApp1

the result is :


Le service HSysApp1 démarre........ (i.e. HSysApp1 service starts......)

Le service HSysApp1 n’a pas pu être lancé. (i.e. HSysApp1 service cannot be started)

why ? i don't find any detail about this failure.
Any  idea please ?

Print this item

  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 (2)

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 General Discussion - Replies (1)

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: info@a-dato.net - 05-16-2019, 12:13 PM - Forum: Indy General Discussion - 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: 1)
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