Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Intraweb 14 CacheDir



Permlink Replies: 8 - Last Post: Feb 28, 2018 1:07 PM Last Post By: Alexandre Machado Threads: [ Previous | Next ]
Elzaan Fourie

Posts: 4
Registered: 6/23/07
Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 27, 2018 11:12 PM
I upgraded an application from Delphi 2010 to Delphi 10.2 and Intraweb 10 to 14.
Regarding the cache file, what do I need to change to my code and/or directory structure.

procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
ASession.Data := TUserSession.Create(nil);
CacheDir := ASession.ApplicationPath + 'Cache\';
end;

Regards
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 27, 2018 11:36 PM   in response to: Elzaan Fourie in response to: Elzaan Fourie
Elzaan Fourie wrote:
I upgraded an application from Delphi 2010 to Delphi 10.2 and Intraweb 10 to 14.
Regarding the cache file, what do I need to change to my code and/or directory structure.

procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
ASession.Data := TUserSession.Create(nil);
CacheDir := ASession.ApplicationPath + 'Cache\';
end;

Regards

Set the cache dir of the application in ServerController.OnConfig event:


uses
  IW.Common.AppInfo;
 
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
  Self.CacheDir := TIWAppInfo.GetAppPath + 'Cache';
end;
 
Elzaan Fourie

Posts: 4
Registered: 6/23/07
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 27, 2018 11:49 PM   in response to: Alexandre Machado in response to: Alexandre Machado
Does this code also apply for generating an ISAPI dll and deploying it to an ISS server?


Alexandre Machado wrote:
Elzaan Fourie wrote:
I upgraded an application from Delphi 2010 to Delphi 10.2 and Intraweb 10 to 14.
Regarding the cache file, what do I need to change to my code and/or directory structure.

procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
ASession.Data := TUserSession.Create(nil);
CacheDir := ASession.ApplicationPath + 'Cache\';
end;

Regards

Set the cache dir of the application in ServerController.OnConfig event:

 
uses
  IW.Common.AppInfo;
 
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
  Self.CacheDir := TIWAppInfo.GetAppPath + 'Cache';
end;
 
Jose Nilton Pace


Posts: 122
Registered: 5/15/98
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 3:12 AM   in response to: Elzaan Fourie in response to: Elzaan Fourie
Hi Elzaan, i use this code to test is ISAPI or SA:
   if IsLibrary then
      Self.CacheDir := ExtractFilePath( GetModuleName( HInstance ) ) + 'Cache'
   else
      Self.CacheDir := ExtractFilePath( ParamStr(0) ) + 'Cache';
Elzaan Fourie

Posts: 4
Registered: 6/23/07
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 3:49 AM   in response to: Jose Nilton Pace in response to: Jose Nilton Pace
Jose Nilton Pace wrote:
Hi Elzaan, i use this code to test is ISAPI or SA:
   if IsLibrary then
      Self.CacheDir := ExtractFilePath( GetModuleName( HInstance ) ) + 'Cache'
   else
      Self.CacheDir := ExtractFilePath( ParamStr(0) ) + 'Cache';


I've tried this, but same result ..... when accessing the dll, it doesn't respond, looks like it's trying to open the application, but can't.

Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 8:06 AM   in response to: Elzaan Fourie in response to: Elzaan Fourie
deleted...

Edited by: Eitan Arbel on Feb 28, 2018 6:27 PM
Chad Hower

Posts: 613
Registered: 3/2/07
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 8:08 AM   in response to: Elzaan Fourie in response to: Elzaan Fourie
On 2/28/2018 7:49 AM, Elzaan Fourie wrote:
Jose Nilton Pace wrote:
Hi Elzaan, i use this code to test is ISAPI or SA:
    if IsLibrary then
       Self.CacheDir := ExtractFilePath( GetModuleName( HInstance ) ) + 'Cache'
    else
       Self.CacheDir := ExtractFilePath( ParamStr(0) ) + 'Cache';


I've tried this, but same result ..... when accessing the dll, it doesn't respond, looks like it's trying to open the application, but can't.


Try deploying a simple app like Guess to verify your ISAPI setup.
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 1:07 PM   in response to: Elzaan Fourie in response to: Elzaan Fourie
Elzaan Fourie wrote:

Jose Nilton Pace wrote:
Hi Elzaan, i use this code to test is ISAPI or SA:
   if IsLibrary then
      Self.CacheDir := ExtractFilePath( GetModuleName( HInstance )
) + 'Cache'    else
      Self.CacheDir := ExtractFilePath( ParamStr(0) ) + 'Cache';


I've tried this, but same result ..... when accessing the dll, it
doesn't respond, looks like it's trying to open the application, but
can't.


Have you properly configured IIS for ISAPI?

http://docs.atozed.com/docs.dll/deployment/isapi/Deploying%20ISAPI%20using%20IIS.html
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Intraweb 14 CacheDir
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 1:05 PM   in response to: Elzaan Fourie in response to: Elzaan Fourie
Elzaan Fourie wrote:

Does this code also apply for generating an ISAPI dll and deploying
it to an ISS server?

 
uses
  IW.Common.AppInfo;
 
procedure TIWServerController.IWServerControllerBaseConfig(Sender:
TObject); begin
  Self.CacheDir := TIWAppInfo.GetAppPath + 'Cache';
end;
 

Yes, it does. TIWAppInfo works for all types of projects the same way.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02