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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 6,291
» Latest member: Quran Online
» Forum threads: 2,152
» Forum posts: 10,481

Full Statistics

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

Latest Threads
Dummy div in a IWRegion
Forum: IntraWeb General Discussion
Last Post: StephB
Yesterday, 03:58 PM
» Replies: 2
» Views: 53
Create components at runt...
Forum: IntraWeb General Discussion
Last Post: PaulWeem
04-23-2024, 10:27 PM
» Replies: 1
» Views: 70
message when added TIWDBN...
Forum: IntraWeb General Discussion
Last Post: Mike_A
04-22-2024, 02:09 PM
» Replies: 6
» Views: 1,227
303 Redirect and Response...
Forum: IntraWeb General Discussion
Last Post: ALW2019
04-22-2024, 01:25 PM
» Replies: 3
» Views: 503
IW 15.5.9 IWChart
Forum: IntraWeb General Discussion
Last Post: PaulWeem
04-22-2024, 07:16 AM
» Replies: 2
» Views: 225
Data Decimation in ChartJ...
Forum: IntraWeb General Discussion
Last Post: iwuser
04-22-2024, 06:51 AM
» Replies: 8
» Views: 1,551
ClassicRegionDraw
Forum: IntraWeb General Discussion
Last Post: JuergenS
04-17-2024, 05:35 PM
» Replies: 0
» Views: 155
CompressorImplementation
Forum: IntraWeb General Discussion
Last Post: JuergenS
04-17-2024, 05:27 PM
» Replies: 0
» Views: 144
IntraWeb 15.6.0 is out!
Forum: IntraWeb General Discussion
Last Post: Comograma
04-17-2024, 11:54 AM
» Replies: 11
» Views: 954
How to manage forms and v...
Forum: IntraWeb General Discussion
Last Post: David1
04-17-2024, 10:37 AM
» Replies: 0
» Views: 136

 
  Фоновый рисунок страницы
Posted by: Сергей Александрович - 04-21-2020, 01:30 PM - Forum: IntraWeb General Discussion - Replies (2)

Подскажите как правильно указать фоновый рисунок для страницы. 
Цвет устанавливаю и все получается: 
В свойствах формы BGColor := cl(Color)  и фон красится в нужный цвет.
А вот указать фоновый рисунок не получается...
Background.FileName := FileName.jpg; 

Вероятно я не верно указываю путь к файлу или не в том каталоге его размещаю. 
Подскажите как правильно? 

Tell me how to correctly specify the background image for the page.
I set the color and everything works out:
In the form properties, BGColor := cl(Color) and the background is colored to the desired color.
But you can't specify the background image...
Background.FileName := FileName.jpg;


I probably incorrectly specify the path to the file or place it in the wrong directory.
Tell me how to do it correctly?

Print this item

  TIWEdit and HTML legend property
Posted by: valmeras - 04-19-2020, 10:59 PM - Forum: IntraWeb General Discussion - Replies (3)

I am using Intraweb 14.2.7 with Rad Studio Tokyo 10.2.3 (C++ Builder)
I would like to know how I can add a legend to a TIWEdit
I tried the solution below, but it does not work. The legend is not displayed

CSS definition
legend
{
  display: block;
  padding-left: 10px;
  border: none;

 background: none;
}

Then in my application
UnicodeString LegendText="username";
TIWEdit1->ExtraTagParams->Add("legend=" + LegendText);

Print this item

  How enable logs ?
Posted by: Rassamaha78 - 04-19-2020, 06:18 PM - Forum: IntraWeb General Discussion - Replies (2)

In IWBSDemo/bin im see RequestHeaders_1.log and RequestStream_1.log files, how can i enable this logs ? 
P.S. i use HTTPSys

Print this item

  IdTCPServer Freeze on Delphi
Posted by: 3ddark - 04-18-2020, 08:30 PM - Forum: Indy General Discussion - Replies (9)

Hello,
I did a test for IdTCPServer and Client.
The results differed slightly and were interesting.

TCPServer test on Delphi, after 1500+ client connected then freeze,
But lazarus is works fine

Same code same component(Indy10), different result!!!

Test PC Windows 10 64 Bit
Delphi 10.3 Community vs Lazarus 2.0.8 (fpc 3.0.4)
And Delphi 7 same result freeze(Thread creation error)

   

Code:
//Server side code
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
  IdContext, IdTCPServer, IdCustomTCPServer;

type

  { TForm1 }

  TForm1 = class(TForm)
    IdTCPServer1: TIdTCPServer;
    ListBox1: TListBox;
    procedure FormCreate(Sender: TObject);
    procedure IdTCPServer1Connect(AContext: TIdContext);
    procedure IdTCPServer1Disconnect(AContext: TIdContext);
    procedure IdTCPServer1Execute(AContext: TIdContext);
  private

  public

  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.IdTCPServer1Connect(AContext: TIdContext);
var
  List : TIdContextList;
begin
  ListBox1.Items.BeginUpdate;
  try
    ListBox1.Items.Add(AContext.Binding.PeerIP +':'+ AContext.Binding.PeerPort.ToString);
  finally
    ListBox1.Items.EndUpdate;
  end;

  if IdTCPServer1.Active then
  begin
    List := IdTCPServer1.Contexts.LockList;
    try
      Form1.Caption := 'Server - Client : '  +  List.Count.ToString;
    finally
      IdTCPServer1.Contexts.UnlockList;
    end;
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  IdTCPServer1.Active := True;
end;

procedure TForm1.IdTCPServer1Disconnect(AContext: TIdContext);
var
  n1: Integer;
begin
  n1 := ListBox1.Items.IndexOf(AContext.Binding.PeerIP +':'+ AContext.Binding.PeerPort.ToString);
  if n1 > -1 then
    ListBox1.Items.Delete(n1);
end;

procedure TForm1.IdTCPServer1Execute(AContext: TIdContext);
var
  data: string;
begin
  data := AContext.Connection.IOHandler.ReadLn;

  if data= 'E' then
    AContext.Connection.Disconnect;
end;

end.
Code:
//Client side code
unit Unit2;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, IdBaseComponent, IdComponent,
  IdTCPConnection, IdTCPClient, Vcl.StdCtrls;

type
  TForm2 = class(TForm)
    edtIP: TEdit;
    edtPort: TEdit;
    Button1: TButton;
    Button2: TButton;
    edtClient: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    a: Array[1..10000] Of TIdTCPClient;
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
var
  I:integer;
begin
  for  I := 1 to StrToInt(edtClient.Text) do
  begin
    try
      a[I] := nil;

      a[I]:= TIdTCPClient.Create( NIL );
      a[I].Host := edtIP.Text;
      a[I].Port := StrToInt(edtPort.Text);
      a[I].Connect;
      a[I].IOHandler.WriteLn( 'main|ADDNEW|1234abcd|' + IntToStr(i) + ' |t2|t3|t4|t5|t6|t7|t8|NEW' );
      Self.Caption:= 'Clients  : ' + IntToStr(i);
      Sleep(10);
      Application.ProcessMessages;
    except

    end;
  end;
end;

end.

Print this item

  Bootstrap4 fileinput bug
Posted by: Rassamaha78 - 04-18-2020, 08:26 PM - Forum: IntraWeb General Discussion - Replies (23)

Im use iwbootstrap4 + Bootstrap File Input library for upload files:

Code:
procedure TFrameProductPicture.IWBS4File1CustomRestEvents0RestEvent(
  aApplication: TIWApplication; aRequest: THttpRequest; aReply: THttpReply;
  aParams: TStrings);
var
FileUpload: THttpFile;
begin
  if aRequest.Files.Count > 0 then
   begin
    FileUpload := THttpFile( aRequest.Files[ aRequest.Files.Count - 1 ] );

    FPictureFile := IWServerController.ContentPath +
                    UPLOAD_FOLDER + '\' +
                    TPath.GetGUIDFileName.ToLower +
                    ExtractFileExt( FileUpload.FileName );

    FileUpload.SaveToFile( FPictureFile );
   end;

  aReply.WriteString('{"id": "1"}');
end;

Most JPG files load normally, but some JPG files, as well as ALL PNG files get corrupted after loading (only part of the image is loaded), here is an example of files BEFORE and AFTER uploading to the server. What could be the reason ?

IW version: 15.1.19

   

.png   2bd0d041e0ef4632bf8e55d21ebc70a8.png (Size: 252.03 KB / Downloads: 10)

Print this item

  None technical thread - how are you during COVID19 pandemic
Posted by: Madammar - 04-18-2020, 08:47 AM - Forum: Indy General Discussion - Replies (2)

I have no questions to ask i am just posting this thread to check on all of you during this pandemic COVID19. Specially @rlebeau how are you bro during this pandemic? 
I wanted to thank you for all your efforts in helping everyone as possible as you can.
I have learned alot from you even when i knew nothing about delphi and from where to start with most basic things, i will never forget that.
Thank you bazillion times. for me its so rare to find a knowledgeable expert who teach without waiting any thing from his teaching and helping, you are great human being.
Thank you to every one who make a forum like this to make it easy to communicate and get help from experts in easy way. 

Stay safe everyone, stay home hopefully this pandemic pass with no harm ♥️

Print this item

  IntraWeb 15.1.20 - Server Error with ASPX
Posted by: JohBer - 04-17-2020, 09:26 AM - Forum: IntraWeb General Discussion - Replies (12)

Hello,

I'm getting the below error when deploying my IW application on IIS. Is it a confirguration issue, or simply a bug in the ASPX-dlls included in 15.1.20?

[Image: 4TDC969]
Server Error

Full stack trace:

Code:
[ArgumentException: Not a legal OleAut date.]
   System.DateTime.DoubleDateToTicks(Double value) +5360760
   IntraWeb.MainController.ProcessResponse(PacketReader aReader) +655
   IntraWeb.MainController.ProcessAppMode() +112
   IntraWeb.MainController.Index() +68
   lambda_method(Closure , ControllerBase , Object[] ) +62
   System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +182
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
   System.Web.Mvc.Async.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41() +28
   System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +49
   System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +58
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +228
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +49
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +44
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +55
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +45
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +16
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +50
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9871377
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159

If possible, could the intraweb ASPX-DLL source code be made available to be able to have control over these kind of deployment errors?


Best regards,
Johan

Print this item

  pooled Connections usage
Posted by: dcazarez - 04-13-2020, 07:40 PM - Forum: IntraWeb General Discussion - Replies (1)

Could you please point me to the best practice on using pooled connections?. 
The use of LockDataModule and UnlockDatamodule.
I have an iw15.1.9+Delphi XE7 + FireDac + SQL Server app working with this scenario and we are facing frequent htto error 500 on IIS 8.5 (ISAPI) with very small load of users (10 concurrent).

We saw that sometimes the session data from different users were mixed so we discovered that we where using incorrectly the tiwPoolDatamodule object on serverController.

We are using grids and db aware controls so we could not simply Lock and Release on the same procedure. We decided not tu add the DB Query/Connection Controls to UserSession and use pooled connections due to the scalability on connectios that we are specting to have, 300 concurrent connections.

We use a LockDatamodule on every single entry event point and an UnLockDatamodule on the AfterRender+OnDestroy event of every single form.

This is not working, we are leaving some Datamodules blocked so we are consuming all of the datamodules available and ending with no more pool connections available error.

I think this is a very complex problem with multiple problems on one text but I think is due to the way we are using the pooled connections.


thank you in advance for any advice

Print this item

  Application that runs under 15.1.17 stop working under 15.1.19
Posted by: David1 - 04-09-2020, 01:56 PM - Forum: IntraWeb General Discussion - Replies (1)

Hello,
I am working using Delphi 10.3.3 Upd 3 on Windows 10 64bit
Due to some problems about opening CGDevTools dialogs after deployed the application as an ISAPI extension I tried to update my IW  from 15.1.17 to 15.1.19.
Using 15.1.17 everything worked fine a part problems opening dialogs.
Under 15.1.19 the application stop running at the begining.

In the TIWUserSession.IWUserSessionBaseCreate I instatiate several data module to permit to access them as a UserSession property:

Code:
Connection.Params.Values['Server'] := '(local)';

FFilialiDataModule := TFilialiDataModule.Create(Self);
FListiniDataModule := TListiniDataModule.Create(Self);
FPromozioniDataModule := TPromozioniDataModule.Create(Self);
FUtentiDataModule := TUtentiDataModule.Create(Self);

When I run the program I get an error at the second data module (FListiniDataModule) create call.
The error is about the FireDAC connection on a TFDQuery, which resides in the data module, is not defined.
The connection of the query point to the UserSession connection and the module is correctly in the use clause of the data module.
I tried to explicitly set it in code but nothing changed.

The same code runs well using IW 15.1.17  Huh

Do you have any advice about how to solve this error?

Thank you,
Davide

Print this item

  Delphi 10.3 - Enable application to send emails without email client
Posted by: joceravolo - 04-08-2020, 06:22 PM - Forum: Indy General Discussion - Replies (5)

Hi,

I want to make an application send different emails using tidSMTP.
The tests I am doing using Yahoo or Gmail to send the email it not working but I don't know why.
I don't get an error, but the test email does not work.
The message that pops up is Connection close graciously.
I am new to this and I haven't found any documentation on how to approach this.

Thanks in advance,

Here's the code:

With IdSSLIOHandlerSocketOpenSSL1 do
  begin
    Destination := dbeSMTPServer.Text + ':' + dbeSMTPPort.Text;
    Host := dbeSMTPServer.Text;
    MaxLineAction := maException;
    Port := StrToInt(dbeSMTPPort.Text);
    SSLOptions.Method := sslvTLSv1;
    SSLOptions.Mode := sslmUnassigned;
    SSLOptions.VerifyMode := [];
    SSLOptions.VerifyDepth := 0;
  end;
//SETTING SMTP COMPONENT DATA //
  IdSMTP.Host := dbeSMTPServer.Text;
  IdSMTP.Port := StrToInt(dbeSMTPPort.Text);
  IdSMTP.Username := dbeSMTPUser.Text;
  IdSMTP.Password := dbeSMTPPassword.Text;
  IdSMTP.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
  IdSMTP.AuthType := satDefault;
  //IdSMTP.UseTLS := utUseExplicitTLS;
// SETTING email MESSAGE DATA //
  IdMessage.Clear;
// add recipient list //
  with IdMessage.Recipients.Add do
  begin
    Name := dbeFullName.Text;
    Address := dbeEmail.Text;
  end;
  IdMessage.From.Address :=  dbeEmail.Text;
  IdMessage.Subject := 'Email Test From Sales Manager';
  IdMessage.Body.Add('Hi ' + dbeFullName.Text + ',' + chr(13) + chr(13) +
                    'If you received this email, the configuration of the email for the user ' + dbeUsername.Text +
                    ' is correct!');
  IdMessage.Priority := mpHigh;
  try
    IdSMTP.Connect();
    IdSMTP.Send(IdMessage);
    ShowMessage('Email sent');
    IdSMTP.Disconnect();
  except on e:Exception do
    begin
      ShowMessage(e.Message);
      IdSMTP.Disconnect();
    end;
  end;

Print this item