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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 261
» Latest member: supplementforhealth
» Forum threads: 349
» Forum posts: 1,562

Full Statistics

Online Users
There are currently 24 online users.
» 1 Member(s) | 20 Guest(s)
Bing, Google, Yandex, UdoBausch

Latest Threads
TIWDBImage does not work ...
Forum: IntraWeb General Discussion
Last Post: magosk
36 minutes ago
» Replies: 0
» Views: 3
How To Write a JavaScript...
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
50 minutes ago
» Replies: 1
» Views: 42
Placeholder disappears
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
1 hour ago
» Replies: 1
» Views: 20
Uploading more files
Forum: IntraWeb General Discussion
Last Post: odisej2
2 hours ago
» Replies: 0
» Views: 4
Call async on click from ...
Forum: IntraWeb General Discussion
Last Post: odisej2
2 hours ago
» Replies: 2
» Views: 28
How to abort TIdImap4.Con...
Forum: Indy General Discussion
Last Post: edwinyzh
3 hours ago
» Replies: 0
» Views: 1
Get size of TIdMessage wi...
Forum: Indy General Discussion
Last Post: edwinyzh
5 hours ago
» Replies: 2
» Views: 16
Centralized session manag...
Forum: IntraWeb General Discussion
Last Post: kudzu
6 hours ago
» Replies: 3
» Views: 41
Fast forward audio with I...
Forum: IntraWeb General Discussion
Last Post: kudzu
6 hours ago
» Replies: 3
» Views: 33
IWAudio nao posso avancar...
Forum: IntraWeb Dúvidas Gerais
Last Post: kudzu
6 hours ago
» Replies: 3
» Views: 10

 
  TIWDBImage does not work with vFileAccess = faRequireSession
Posted by: magosk - 36 minutes ago - Forum: IntraWeb General Discussion - No Replies

Hi! We discovered that a frame containing a TIWDBImage did not work when we had set vFileAccess := faRequireSession in IWServerControllerBaseValidateCacheFileAccess. If you debug the web page you get the following error:


Code:
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier). GET - http://192.168.4.30:9013/iJpZEkkD90Ig4vhmnuKR8q/$/temp/ATZiwn17FqBleI5B3MTnwWxFG.png


As a temporary bug fix I can set vFileAccess := faGrant for png files, but we would like to have session validation for all cache files.

Print this item

  Uploading more files
Posted by: odisej2 - 2 hours ago - Forum: IntraWeb General Discussion - No Replies

Hi again

I'm so happy with the forum as you helped me with one of my issues. I'm also more and more happy with the Intraweb. But I do have another question. File uploading.
I'm using IWFileUploader1 and layout manager and I also want to upload on a button press. It was a challenge to setup things to work. I'm happy with it but not 100%. The problem is that I'm not able to upload more than one file at a time. I'm showing uploaded files in a datatable. So I need to do a page refresh when upload is completed. I do a full submit in IWFileUploader1AsyncUploadSuccess like this:

WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA('SubmitClick("btnRefresh","",true);');

But IWFileUploader1AsyncUploadSuccess is called after each file so if I have more that full submit breaks the upload. So finally the question. Is there anything that I can use to know if that was the last file uploaded? Or can I call some kind of a refresh page that does not break the upload. What I need is to drop into IWTemplateProcessorHTML1UnknownTag for my page to "draw".

Thanks again

Grega

Print this item

  How to abort TIdImap4.Connect?
Posted by: edwinyzh - 3 hours ago - Forum: Indy General Discussion - No Replies

As we know, we can abort any TIdTCPConnection child classes in the OnWork event, including the TidImap4 client component.

But how to abort the connection before the timeout value is reached? 

Thanks.

Print this item

  Placeholder disappears
Posted by: wadcompany - Yesterday, 06:48 PM - Forum: IntraWeb General Discussion - Replies (1)

Hello friends could tell me if it is normal in an IWDBEDIT after an insert, the placeholder disappear. I have this problem in all the templates, using the IW15, only to appear in IW14 did not occur these problems. Thank you.

Print this item

  Post JSON with IDHTTP
Posted by: mo_ayad - Yesterday, 10:35 AM - Forum: Indy General Discussion - Replies (1)

I am trying to post a JSON to web rest service but always with message HTTP1.1/BAD request.
The page in question is test page: https://dev.slimpay.com/hapi/browser#create-payins and the json is

Code:
POST Follow(https://api.slimpay.net/alps#create-payins) HTTP/1.1
Accept: application/hal+json; profile="https://api.slimpay.net/alps/v1"
Authorization: Bearer token
Content-Type: application/json

{
   "creditor": {
       "reference": "democreditor"
   },
   "subscriber": {
       "reference": "subscriber5bea84af2e9e3"
   }
}

The first two steps on the test page OK with IDHTTP and SSL but this test step i am aunable to proceed, my code is the following:

Code:
htpBrwsr.Request.Accept := 'application/hal+json; profile="https://api.slimpay.net/alps/v1"';
htpBrwsr.Request.CustomHeaders.Add('Authorization: Bearer ' + sToken); // token got correctly from previous step
htpBrwsr.Request.ContentType := 'application/json';
// htpBrwsr.Request.CharSet := 'UTF-8';        
ms := TMemoryStream.Create;
ss := TStringStream.Create('{"creditor": {"reference": "democreditor"},"subscriber": {"reference": "subscriber5bea84af2e9e3"}}');
ss.Position := 0;
htpBrwsr.Post('https://api.preprod.slimpay.com/payments/in', ss, ms); // error HTTP1.1/400T


htpBrwsr is an TIDHttp related to a TIdSSLIOHandlerSocketOpenSSL, a similar TIDHttp functions well in the first two steps sited on the test page and I obtain the token with no problems.

any help will be aprecieted..

Print this item

  Call async on click from img
Posted by: odisej2 - Yesterday, 07:42 AM - Forum: IntraWeb General Discussion - Replies (2)

I use Intraweb together with layout manager. When populating table with some images I do this in IWTemplateProcessorHTML1UnknownTag:

VValue := '<a href="#" onclick="SubmitClickConfirm(''btnSend'',''' + 'somekey' + ''', true, '''');return false;">' + '<img src="images\send.png" />' + '</a>';

Behind btnSend I have some code. And that is full sumbit of the form which is ok in this case.

But now I want to call OnAsyncClick of the button when user clicks on that img. Any ideas what to do?

Regards

Grega

Print this item

  Get size of TIdMessage without first saving to TStream
Posted by: edwinyzh - Yesterday, 03:51 AM - Forum: Indy General Discussion - Replies (2)

Hello,

We all know we can get the size of a TidMessage instance by first saving it to a TMemoryStream and read TMemoryStream.Size to get the size of the email message in bytes, but this doesn't sound performance-friend.

Is there an alternative way to get the size of a Tidmessage object?

Thanks.

Print this item

  Problem opening a link in v15.0.14 and v15.0.15
Posted by: ioan - 11-12-2018, 09:59 PM - Forum: IntraWeb General Discussion - Replies (3)

Starting with version .14, the following link breaks something in the IW application if is compiled with http.sys:


Code:
http://server/?level=sslfaxv3&id=f1mFiOlnZy00Tu8%2FpUHJ%2FpTuZFJF2rbBrOG6K8WrMWEYNhFYpwCEJE2u2r46E%2FSujZc%2Bd%2FdEqf%2BYV%2F3qhw%3D%3D

Up to version .13 it works fine, but starting with version .14, the application doesn't ever get inside TIWServerController.IWServerControllerBaseGetMainForm when clicking that link. It seems that the problem is with the value of the "id" query field. If I change the value to id=aaaaaaa, or any simple string, it works fine. As I said, this above link works fine in version .13.

The value of the "id" is created by using TNetEncoding.URL.Encode(...) on a long string.

Print this item

  IdUDPServer issue
Posted by: BartKindt - 11-12-2018, 07:03 PM - Forum: Indy General Discussion - Replies (1)

I use an IdUDPServer to open multiple Ports like this:

Code:
IdUDPServer1.Active := false;

Socket1 := IdUDPServer1.Bindings.Add;
     Socket1.IPVersion := Id_IPv4;
     Socket1.IP := HyteraSettings.TCPLocalIP;
     Socket1.Port := HyteraSettings.RRSPort; // RRS PORT

     if HyteraSettings.Debug then LocalLog('UDPServer Bindings.Add: '+HyteraSettings.TCPLocalIP+' Port '+IntToStr(HyteraSettings.GPSPort));
     Socket1 := IdUDPServer1.Bindings.Add;
     Socket1.IPVersion := Id_IPv4;
     Socket1.IP := HyteraSettings.TCPLocalIP;
     Socket1.Port := HyteraSettings.GPSPort; // GPS PORT
Then I set Active to TRUE.

Afterwards I got an exception caused by the other side: , UDPServer Exception: Socket Error # 10054Connection reset by peer.
I then call IdUDPServer1.Active := false; and I completely FreeAndNil it.

Then the loop starts again from fresh, with a newly created UDPServer.
However, now I get the Exception: Could not bind socket. Address and port are already in use

Why does this happen? Should I somehow manually clear the sockets before setting the Active to False?

Bart

Print this item

  Centralized session management
Posted by: mhammady - 11-12-2018, 06:38 PM - Forum: IntraWeb General Discussion - Replies (3)

Hello,

Is there is a way in IW to setup a cluster that when a session is opennedcan be used by any server in the IW cluster?

The main reason behind this question is the complexity behind setting up a load balancer with sticky sessions.

I'm using IW 14.2.7 with D XE5 as ISAPI

Thank you

Mohamed

Print this item