1. Buck Woolley
  2. PowerServer 2020 or older (Obsolete)
  3. Tuesday, 16 October 2018 16:15 PM UTC

We are testing a prototype of a PB app on the web.  So far just using the company network.  I have tried to configure Powerserver to store files (like INI) on the client machine (auto download) using the default user profile location.  However the folder does not get created and the files are not transferred.  The cachefolder returned by the of_getcachedir does not exist.  The fileservice has been installed on the server but I am sure that there is some setup I havent done to make this happen.  Everything runs fine on the localhost machine since the files are located there. Running PB 2017 R3. 

Marco Meoni Accepted Answer Pending Moderation
  1. Thursday, 18 October 2018 06:41 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hello,

as I said, INI files have their own management through PB (Set)ProfileString functions.

In addition, you can create folders or local files on the client machine as much as you want, as long as the client user has write permissions.

The easiest and more portable approach, which does not rely on any pre-defined dir on the client as in a 2-tier application, is to store any TXT, picture, local file under AppeonGetCacheDir() + '\plugin\', which corresponds to 

C:\Users\\AppData\Roaming\appeon\\plugin

Simply use

li_rc = FileOpen(AppeonGetCacheDir() + '\plugin\' + ls_myfilename, TextMode!, ....)

and Read/Write whatever you want.

Best,

.m

Comment
There are no comments made yet.
Buck Woolley Accepted Answer Pending Moderation
  1. Tuesday, 16 October 2018 21:54 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Ok this is good for the database .ini file but how about network folders used for storing letters, documents and templates?  Also local drives on the client for temp storage and logs?

Is this possible?

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 17 October 2018 15:10 PM UTC
Hi Buck;

I have done this before in PS Web Apps but of course, this would not be the case in PS Mobile Apps as the environment is non-Windows.

For this to work though in PS Web (if I recall correctly), you have to observe the following:

1) Can only use "Mapped" drives (no UNC designations).

2) Your network mapped drives must have proper "read " access rights

3) You local PC user must have the correct rights to the mapped drives.

HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Tuesday, 16 October 2018 16:26 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

Hello Buck,

no folder will be created, and no INI file will be downloaded to the client.

Rather, corresponding XML files will be cached in the AppeonGetCacheDir().

But you do not have to worry about what PowerServer does under the hood.

Just keep using PB functions ProfileString() and SetProfileString(), with no absolute pathname as filename, just  "filename.ini".

The 2 functions will work straight off.

Best,

.m

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.