| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 547 online users. » 0 Member(s) | 543 Guest(s) Applebot, Bing, Google, Yandex
|
| Latest Threads |
Change Language DataTable
Forum: IntraWeb General Discussion
Last Post: Rigoberto Mercedes
6 hours ago
» Replies: 1
» Views: 15
|
How to terminate HTTP Thr...
Forum: Indy
Last Post: rlebeau
08-14-2026, 08:01 AM
» Replies: 5
» Views: 423
|
VCL conversion
Forum: Delphi General Discussion
Last Post: marktuan
08-07-2026, 01:20 PM
» Replies: 0
» Views: 389
|
Looking for UI Design Tip...
Forum: Delphi General Discussion
Last Post: chrisjordon232
08-06-2026, 05:17 AM
» Replies: 0
» Views: 121
|
Simply convert PeerIp to ...
Forum: Indy
Last Post: DidierMenant
08-04-2026, 03:50 PM
» Replies: 2
» Views: 285
|
New CGDevTools build is a...
Forum: CGDevTools
Last Post: lfeliz
08-04-2026, 12:03 AM
» Replies: 2
» Views: 1,439
|
IW 16.2.0 Missing librari...
Forum: IntraWeb General Discussion
Last Post: JuergenS
07-31-2026, 09:44 AM
» Replies: 6
» Views: 1,393
|
CSS file not reloading af...
Forum: IntraWeb General Discussion
Last Post: CharlieDunn
07-29-2026, 10:02 AM
» Replies: 3
» Views: 540
|
Datatables question
Forum: IntraWeb General Discussion
Last Post: Alexandre Machado
07-28-2026, 04:34 AM
» Replies: 2
» Views: 353
|
Intraweb components missi...
Forum: IntraWeb General Discussion
Last Post: valmeras
07-27-2026, 03:18 PM
» Replies: 3
» Views: 470
|
|
|
| Error 1053: When starting a new service |
|
Posted by: TiredDev - 09-02-2020, 05:03 PM - Forum: IntraWeb General Discussion
- Replies (2)
|
 |
We use several AWS servers, all the same configuration. On one of them we can start around 20 services with no problem. But when we try to add one more we instantly get the
Error 1053: [i]The service did not respond to the start or control request in a timely fashion[/i]
We've added a lengthier time out but that didn't help. Didn't think it would as the error comes up right away. Now, If I stop one of the services, and try to start the one that previously failed, it comes up just fine. So it behaves like there is a limit. AWS say they have no such limit. Plus, we have quite a few more running on other servers with no such problem.
Any ideas?
IntraWeb 14.1.14
2012 Server R2
|
|
|
| Use TIdHttp inside TThread anonymous function doesn't raise exceptions |
|
Posted by: Ahmed Sayed - 09-02-2020, 01:20 AM - Forum: Indy
- Replies (6)
|
 |
Hi all,
I am using a subclass of TIdHttp to expose DoRequest function. I use it in a tool similar to Rest Debugger so what I want to achieve regardless of the code because I can't show it. But I am pretty sure you will get the idea.
I use this new class inside a thread so I can handle files downloads and uploads with progress bars correctly without blocking the UI, and I do all the necessary synchronizations with the UI. My only problem is client side exceptions for example when I do a request and the server is not running nothing happens at all. Nothing is shown in the memo or as dialog message. I understand that this behaviour is because I am executing the request inside a thread.
I want to catch any exception that was raised on the server with error code 500 inside a TMemo as long as any response message, and any exception that is not related to server side internal errors to be displayed normally in a dialog message box.
now this is not the actual code but it is similar:
Code: __fastcall TIdHttpEx::TIdHttpEx(TComponent *Owner)
: TIdHTTP(Owner)
{
HTTPOptions = TIdHTTPOptions() >> hoWantProtocolErrorContent;
FHTTPBody.reset(new TIdHTTPBody);
FHTTPBody->IdHTTP = this;
FHasErrorResponse = false;
FRaiseExceptionOn500 = true;
FLastErrorResponse = "";
}
//---------------------------------------------------------------------------
int __fastcall TIdHttpEx::DoExecute(String AMethod, String AURL, TStream* AResponseContent, TStream* ARequestContent)
{
try
{
FHasErrorResponse = false;
FLastErrorResponse = "";
if (FHTTPBody->RequestStream == nullptr && ARequestContent != nullptr)
FHTTPBody->RequestStream = ARequestContent;
if (FHTTPBody->ResponseStream == nullptr && AResponseContent != nullptr)
FHTTPBody->ResponseStream = AResponseContent;
if (FHTTPBody->ResponseStream == nullptr && AResponseContent == nullptr)
FHTTPBody->ResponseStream = new TMemoryStream;
DoRequest( AMethod, AURL, FHTTPBody->RequestStream, FHTTPBody->ResponseStream,nullptr,-1);
FResponseOk = (ResponseCode == 200);
if (FHTTPBody->ResponseStream != nullptr)
FHTTPBody->ResponseStream->Position = 0;
}
catch (const EIdHTTPProtocolException &E)
{
if (FRaiseExceptionOn500)
throw Exception(E.ErrorMessage);
else
{
FLastErrorResponse = E.ErrorMessage;
FHasErrorResponse = (FLastErrorResponse.Trim() != "");
DoHTTPErrorEvent(FLastErrorResponse);
}
}
catch (const Exception &E)
{
ShowException(&E, nullptr); //this do the trick but I don't know if it is the right thing to do
}
}
|
|
|
| Passing Delphi variables to Javascript function. |
|
Posted by: thiagorod - 09-01-2020, 06:48 PM - Forum: IntraWeb General Discussion
- Replies (4)
|
 |
Hello,
I have this Javascript function (charting library) that takes an array of values as a variable, like this:
data: [22,61,64,35,91,59,62,91,124,94,77,196,309,147,102,107,199,36,0,0,0,0,0,0],
My doubt is how to make it read a Delphi array as the data input, I mean, how to transfer the values to this JS array.
Sorry if this is simple to do.
Regards,
|
|
|
| java script errors |
|
Posted by: joel - 08-30-2020, 02:04 AM - Forum: IntraWeb General Discussion
- Replies (3)
|
 |
Environment. Iw15.2.15, cgdevtools. 4.1.0.257
I have upgraded to iw15.2.15 and the access violations have disappeared; however, I am still having some issues with the pages locking up because of Javascript errors. I tried setting RednderAsyncEnabled := False, but that did not make any difference.
Here are the errors
1.
(index):102 Uncaught TypeError: Cannot read property 'selection' of undefined
at HTMLDocument.<anonymous> ((index):102)
at i (IWLib__1837908247.js:2)
at Object.fireWith [as resolveWith] (IWLib__1837908247.js:2)
at Function.ready (IWLib__1837908247.js:2)
at HTMLDocument.K (IWLib__1837908247.js:2)
2.
IWBase__870463085.js:2 Error in SendRequest(): Cannot read property 'cloneNode' of undefined
consoleError @ IWBase__870463085.js:2
SendRequest @ IWBase__870463085.js:6
executeAjaxEvent @ IWBase__870463085.js:6
(anonymous) @ (index):59
dispatch @ IWLib__1837908247.js:3
r.handle @ IWLib__1837908247.js:3
The 2nd error "the send request error" is triggered when I click the cgdevtools button.
(08-30-2020, 02:04 AM)joel Wrote: Environment. Iw15.2.15, cgdevtools. 4.1.0.257
I have upgraded to iw15.2.15 and the access violations have disappeared; however, I am still having some issues with the pages locking up because of Javascript errors. I tried setting RednderAsyncEnabled := False, but that did not make any difference.
Here are the errors
1.
(index):102 Uncaught TypeError: Cannot read property 'selection' of undefined
at HTMLDocument.<anonymous> ((index):102)
at i (IWLib__1837908247.js:2)
at Object.fireWith [as resolveWith] (IWLib__1837908247.js:2)
at Function.ready (IWLib__1837908247.js:2)
at HTMLDocument.K (IWLib__1837908247.js:2)
2.
IWBase__870463085.js:2 Error in SendRequest(): Cannot read property 'cloneNode' of undefined
consoleError @ IWBase__870463085.js:2
SendRequest @ IWBase__870463085.js:6
executeAjaxEvent @ IWBase__870463085.js:6
(anonymous) @ (index):59
dispatch @ IWLib__1837908247.js:3
r.handle @ IWLib__1837908247.js:3
The 2nd error "the send request error" is triggered when I click the cgdevtools button.
I did change out the button to just an IWButton and when I tried that I get the following error.
IWBase__870463085.js:2 Error in SendRequest(): Cannot read property 'cloneNode' of undefined
consoleError @ IWBase__870463085.js:2
SendRequest @ IWBase__870463085.js:6
(anonymous) @ IWBase__870463085.js:6
setTimeout (async)
executeAjaxEvent @ IWBase__870463085.js:6
processAjaxEvent @ IWBase__870463085.js:6
IWCL_DoOnClick @ IWBase__870463085.js:5
IWEventHandler @ IWBase__870463085.js:4
|
|
|
| Bug in TIdAttachment::FileName ? |
|
Posted by: Asger-P - 08-27-2020, 05:06 PM - Forum: Indy
- Replies (4)
|
 |
Hi
I think I found a small bug in the TIdAttachment::FileName
I have received a mail with an attachment that have a very stupid filename:
Fakturanr. 119180921 fra Lemvigh-Müller A/S.pdf
Indy only gives med the S.pdf part, the rest is discarded.
I know that the / isn't allowed in a filename on windows and it was ok if indy replaced it, but it should not discard everything in front of it.
I know the real filename because Thunderbird shows all of it, and when I want to save it replaces the / with -.
Can I do anything to get the full filename ??
Thanks in advance
Best regards
Asger
The code I use is this:
Code: bool pdfMail::getPdfAttachments(TIdMessageParts *parts, TMailContent* MailContent )
{
parts->CountParts();
if( parts->AttachmentCount < 1 )return false;
int C = parts->Count;
for( int i = 0; i < C; ++i )
{
TIdAttachment *atcm = dynamic_cast<TIdAttachment*>( parts->Items[i] );
if( atcm && attachmentsIsPdf( atcm->FileName ) )// checks if the extension is pdf
{
MailContent->Attachments.Add( atcm );
}
}
return MailContent->Attachments.Count() > 0;
}
|
|
|
| TIWEdit - RegionalSettings are ignored |
|
Posted by: Lorbass - 08-26-2020, 08:04 AM - Forum: IntraWeb General Discussion
- No Replies
|
 |
Hi guys,
RegionalSettings for edit-control is a good idea.
Setting in IWServerControllerBaseConfig and/or in IWServerControllerBaseNewSession works fine because IWEdit.RegionalSettings returns the correct values.
Properties of IWEdit are defined as
- DataType = stNumber
- DataTypeOptions.NumberType = ntFloat
- DataTypeOptions.NumberValidation = nvIntraWeb
- DataTypeOptions.FloatDP = 2
BUT while editing IWEdit only dot is accepted when DecimalSeparator is defined as comma. If DecimalSeparator is defined as dot neither dot nor comma are accepted.
Something wrong on my side or a bug?!
Thanks in advance for a solution!
|
|
|
|