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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,876
» Latest member: qurangpt
» Forum threads: 2,139
» Forum posts: 10,409

Full Statistics

Online Users
There are currently 353 online users.
» 4 Member(s) | 346 Guest(s)
Bing, Google, Yandex, bostjan, qurangpt, Stevenvax, ThomasBism

Latest Threads
iw15.5.10 does not addres...
Forum: IntraWeb General Discussion
Last Post: valmeras
10 hours ago
» Replies: 2
» Views: 167
Cookies with the SameSite...
Forum: IntraWeb General Discussion
Last Post: valmeras
03-27-2024, 06:59 PM
» Replies: 0
» Views: 55
303 Redirect and Response...
Forum: IntraWeb General Discussion
Last Post: ALW2019
03-26-2024, 02:30 PM
» Replies: 0
» Views: 90
smmFunctions.pas
Forum: IntraWeb General Discussion
Last Post: Mikael Nilsson
03-26-2024, 10:33 AM
» Replies: 0
» Views: 99
TIWjQDBGrid paging
Forum: IntraWeb General Discussion
Last Post: troberts
03-26-2024, 04:06 AM
» Replies: 0
» Views: 102
Problem with cache and 40...
Forum: IntraWeb General Discussion
Last Post: troberts
03-25-2024, 01:54 AM
» Replies: 0
» Views: 110
IWModalWindow from differ...
Forum: IntraWeb General Discussion
Last Post: bjoernb
03-24-2024, 10:52 PM
» Replies: 0
» Views: 133
jQGrid css and js files
Forum: IntraWeb General Discussion
Last Post: medzoom
03-22-2024, 07:06 PM
» Replies: 2
» Views: 2,525
iwSelect list update in a...
Forum: IntraWeb General Discussion
Last Post: joelcc
03-20-2024, 08:07 PM
» Replies: 0
» Views: 142
IntraWeb Certificate Mana...
Forum: IntraWeb General Discussion
Last Post: DavidChiq
03-19-2024, 06:27 PM
» Replies: 1
» Views: 2,086

 
  Event to authorize access to IW forms
Posted by: cprmlao@hotmail.com - 11-20-2019, 11:14 PM - Forum: IntraWeb General Discussion - Replies (8)

Hi,

I have many forms in my project.
I have created a table to put the rights of each user. 
Some users only can access some forms.

What  would be the better event to check if a user is authorized to load and see the form?
I´d like to show a dialog message in that event if the user is not authorized.

I think is a a event in servercontroller. But, what? and How to send  a async message to browse saying the user is not authorized? Is possible to send a message from servercontroller and not from a form?

I will appreciate some others ideas about it

Regards , 
Luiz

Print this item

Wink Callback function not registered error
Posted by: DavidChiq - 11-20-2019, 03:16 PM - Forum: IntraWeb General Discussion - Replies (6)

I have an error when using the Chrome browser that doesn't seem to show up with Firefox.  My application has two timers on the web page, both with OnAynchTimer events.  When the user clicks on a button to call up a log file to display, which is an OnAsyncClick event which calls withtLogForm.Create(WebApplication) do Show;  the user often gets the popup dialog that says "Callback method not registered: PAGETIMER.DoOnAsyncTimer" and/or "Callback method not registered: LV_TIMER.DoOnAsyncTimer". The attachment shows one of the popups.

I have never registered callback methods and did not have this error.  I am using Delphi 10.2 and Intraweb 15.1.9.  Due to some security issues the users can't use FireFox for now, so are seeing this popup a lot.  Is there an easy fix?  (How am I supposed to do this I guess I am asking.)  [Image: wink.png]

Thanks,
David

Print this item

  IW 15.1.9 is out
Posted by: Alexandre Machado - 11-20-2019, 09:59 AM - Forum: IntraWeb General Discussion - Replies (2)

Hi guys,

new IW 15.1.9 has been released.

https://www.atozed.com/2019/11/15-1-9/

This version is compatible with new RAD Studio 10.3.3 (RAD Studio 10.3 Rio, Update 3). Update 3 has not been released to general public yet, but this IW version can be also be installed on 10.3.2 (RAD Studio 10.3 Rio, Update 2 + Runtime compatibility patch). When Update 3 is released (soon) there will be no need to reinstall IntraWeb.

Enjoy!  Big Grin

Print this item

  Impossible to break SSL request w/o AV
Posted by: evgenyk - 11-19-2019, 02:20 PM - Forum: Indy General Discussion - Replies (1)

Hi,

How to correctly break SSL request that is launched in background thread ?
nowadays I have situation when TIdSSLSocket is destroyed after calling Disconnect:

Quote:IdSSLOpenSSL.TIdSSLSocket.Destroy
System.TObject.Free
IdSSLOpenSSL.TIdSSLIOHandlerSocketOpenSSL.Close
IdTCPConnection.TIdTCPConnection.Disconnect(???)
IdTCPConnection.TIdTCPConnection.Disconnect
but TIdSSLSocket.Send is still executed and I have AV because fSSL is nil:

Code:
function TIdSSLSocket.Send(const ABuffer: TIdBytes; AOffset, ALength: Integer): Integer;
var
  ret, err: Integer;
begin
  Result := 0;
  repeat
    ret := SSL_write(fSSL, @ABuffer[AOffset], ALength); //<<<< AV
call-stack for this is
Quote:IdSSLOpenSSL.TIdSSLSocket.Send(...)
IdSSLOpenSSL.TIdSSLIOHandlerSocketOpenSSL.SendEnc(???,???,224)
IdSSL.TIdSSLIOHandlerSocketBase.WriteDataToTarget(???,???,224)
IdIOHandler.TIdIOHandler.WriteDirect(...)
IdIOHandler.TIdIOHandler.WriteBufferFlush(???)
IdIOHandler.TIdIOHandler.WriteBufferFlush
IdIOHandler.TIdIOHandler.WriteBufferClose
IdHTTP.TIdHTTPProtocol.BuildAndSendRequest(???)
IdHTTP.TIdCustomHTTP.ConnectToHost($7EA93560,???)
IdHTTP.TIdCustomHTTP.DoRequest(???,'https://.....',$7E91CBF0,$7E9B7AA0,(...))
IdHTTP.TIdCustomHTTP.Post('https://......',$8663B0,$7E9B7AA0)

as a workaround, I can suggest to add checking like if fSSL = nil then Break; in the beginning of loop

Print this item

  Possible IW Bug serving files folders with hyphen
Posted by: cprmlao@hotmail.com - 11-16-2019, 03:39 PM - Forum: IntraWeb General Discussion - Replies (15)

Hi,
In IW wwwroot, I have a folder ".well-known" and a subfolder "acme-challenge".

Then I put a file to test("test.txt") at 

Code:
wwwroot/.well-known/acme-challenge/test.txt

In the Browser when I try access the file using:
http://127.0.0.1//.well-known/acme-challenge/test.txt

IW returns to browser an error "Resource not found".

If I get rid off the hyphen from "acme-challenge" and change to "acme_challenge".
And I use  http://127.0.0.1//.well-known/acme_challenge/test.txt   then  IW find the fille and shows in the browser.

Is it a IW bug or am I doing something wrong?

Print this item

  Mixing of usersessions?
Posted by: etwoss - 11-16-2019, 08:51 AM - Forum: IntraWeb General Discussion - Replies (4)

Hi

I use a datamodule pool with my program. Each user can have a different db to look at. The usersession holds the path to that database,
Now i adjusted the Lock and Unlock :

Code:
function LockDataModule: TDtmMain;
begin
  Result := TDtmMain(TIWServerController(GServerController).Pool.Lock);
  if Result.IBDatabase.Connected then
  begin
    if Result.IBTransaction.InTransaction then
         Result.IBTransaction.Rollback;

    Result.IBDatabase.Connected := False;
  end;

  Result.IBDatabase.DatabaseName := UserSession.DbPad;
  Result.IBDatabase.Open;
end;

And

Code:
procedure UnlockDataModule(ADataModule: TDtmMain);
var
  LTemp: TDataModule;
begin
  LTemp := ADataModule;
  if TDtmMain(LTemp).IBTransaction.InTransaction then
     TDtmMain(LTemp).IBTransaction.Rollback;

  TDtmMain(LTemp).IBDatabase.CloseDataSets;
  TDtmMain(LTemp).IBDatabase.Close;
  TDtmMain(ADataModule).IBDatabase.DatabaseName := '';

  TIWServerController(GServerController).Pool.Unlock(LTemp);
end;


However, once in every 4-6 months we have a customer showing me data from another customers db! Which is ofcourse not what i want.
After loggin out/in the users gets the correct database info.

It's all about the line

Code:
  Result.IBDatabase.DatabaseName := UserSession.DbPad;

Which should work properly , if it choses someone else its usersession, this goes wrong.

Any idea what could go wrong ???

Eric

Print this item

  E-Mail Validate??
Posted by: ShaneStump - 11-15-2019, 07:21 PM - Forum: IntraWeb General Discussion - Replies (5)

Howdy All!

I have an e-mail regexp that I have been using that validates most e-mail addresses.

I have tried it (and many others I have seen in stackoverflow) and none of them validate a test e-mail account I have been given by Viator. I have tried some of the online validators and they work!

So my question is does anyone have a C++ or Delphi regexp that can validate the following e-mail account and return True.

MSG-8b17fa92-7b35-4fdb-9f18-f8a69252e019+BR-999999999@expmessaging.tripadvisor.com

Thanks in advance,

Shane

Print this item

  IW unable to server static files in folder
Posted by: cprmlao@hotmail.com - 11-15-2019, 01:53 PM - Forum: IntraWeb General Discussion - Replies (9)

Hi I am trying create a valid SSL certificate withn zeroSSL.

To validate the CSR I choice HTTP option and zeroSSL saids I have to put some files in "{wwwroot}.well-known/acme-challenge/" folder

I am having a problem where IW is unable to server static files when I create ".well-known/acme-challenge/"  into wwwroot.

IW returns an error of "Resource not found".

It seems IW has a problem com "hyphen". I was searching in the google, I can see "hyphen" is a legal char in a URL and doesn´t needs to encode it.
But if I encode it, I also have the same problem.



Code:
127.0.0.1/.well-known/acme-challenge/teste.txt   // here I get resource not found


I did a test changing  the names folder to the next, and it works
Code:
127.0.0.1/.well-known/acme_challenge/teste.txt  // here it works

But I need to use:
Code:
127.0.0.1/.well-known/acme-challenge/teste.txt

I have tried to change  hyphen with "%2D" but no look.

How could I fix it?
Is it a IW bug?

Regards, Luiz

Print this item

  TIdTelnet Disconnect
Posted by: omarreis - 11-15-2019, 01:03 PM - Forum: Indy General Discussion - Replies (4)

I'm using telnet client in my app, to access streaming market data.
It works ok for Windows and iOS, but on Android the app hangs
for several seconds when telnet.Disconnect is called.  So much that
Android detects the app is stalled and terminates it.

I understand that Connect and Disconnect can block the
execution, so they are not to be called from the UI thread.
But why Disconnect takes so long ?

One guy suggested on stackoverflow that the reader thread
was locked or not finishing, and that blocked the Disconnect call.

So I tried to create a thread dedicated to disconnect.
It seems to work   Smile 

Code:
procedure TForm1.ThreadedTelnetDisconnect;
var aThreadDisconnect:TThread;
begin
  aThreadDisconnect := TThread.CreateAnonymousThread(
      procedure begin
        IdTelnet1.Disconnect;
      end);
  aThreadDisconnect.start();
end;

Print this item

  GStack.LocalAddress returns empty only with Delphi 10
Posted by: processeur_fou - 11-14-2019, 05:15 PM - Forum: Indy General Discussion - Replies (8)

Hello,

I use UDP to send a  video stream to VLC, it works very well when I have a local network active (Wifi or Ethernet).
But if I have no Wifi and no Ethernet card activated, it works if I compile my source code using Delphi2010 ( using 127.0.0.1 IP address) but doesn’t work if I compile my source code using Delphi 10.
After searching, I discover that  my procedure to find local IP can find 127.0.0.1 ( Nbr of local IP =1) using Delphi 2010 but find no local IP using Delphi 10 (Nbr of local IP = 0)

Code:
TIdStack.IncUsage;  LocalIPasked := '0.0.0.0';
  try    //**************************************************************
    NbLocalIP := GStack.LocalAddresses.Count;
    Memo1.Lines.Add(Format('nbr of local IP= %d ', [NbLocalIP]));
    for i := 0 to NbLocalIP-1 do
      begin
        Memo1.Lines.Add(Format('IP n° %d = %s', [i + 1, GStack.LocalAddresses[i]]));
      end;
  finally
    TIdStack.DecUsage;
  end;

 
Why do I have this difference between Delphi2010 and Delphi_10 ? Have I miss something or compiler setup when I change my Delphi 2010 to Delphi 10?


Rem: I have tested also a second way to find the number of local IP but same result (0) using Delphi 10


Code:
...
LList := TIdStackLocalAddressList.Create;
  try
    GStack.GetLocalAddressList(LList);
    Memo1.Lines.Add(Format('nbr of local IP found: %d ', [LList.Count]));
...

Result is 0 using Delphi 10

Can someone tell me where I miss something?
Thank you.

Print this item