Page 1 of 1

userimgcache

PostPosted: 06 Apr 2016 07:09
by etwoss
Hi

Having cache problem in ISAPI environment.

I have read:

if TIWCGPicture.UserCache = True, it will created session image files in userimgcache subfolder, that are always created one time per session, and are deleted when and if the web application exits normally, all the subfolder userimgcache is deleted in these circumstances.


As you can see in the image it tries to create a file in a session subfolder. We made sure the folders are writable.
Any idea what can go wrong here?

My development is with a standalone exe, I don't see any Session based folder being created, but all works fine!

My Code with the Image causing the problem:

Code: Select all
     if (UserSession.cdsDossier.FieldByName('GESLACHT_ID').AsInteger) = 1 then
        LImage := 'iconm.jpg'
      else
      if (UserSession.cdsDossier.FieldByName('GESLACHT_ID').AsInteger) = 2 then
        LImage := 'iconv.jpg'
      else
        LImage := 'icon.jpg';

      if (FileExists(FFolder + IntToStr(UserSession.SelectedTrajectClient_ID) + '.jpg')) then
      begin
        FS := TMemoryStream.Create;
        FS.LoadFromFile(FFolder + IntToStr(UserSession.SelectedTrajectClient_ID) + '.jpg');
        IWCGJQImage2.Picture.LoadFromStream(FS);
        FS.Free;
      end
      else
      if (FileExists(IncludeTrailingPathDelimiter(IWServerCOntroller.ContentPath) + LImage)) then
      begin
        FS := TMemoryStream.Create;
        FS.LoadFromFile(IncludeTrailingPathDelimiter(IWServerCOntroller.ContentPath) + LImage);
        IWCGJQImage2.Picture.LoadFromStream(FS);
        FS.Free;
      end;


Re: userimgcache

PostPosted: 06 Apr 2016 07:34
by etwoss
Hi

More info

I checked live server

ISAPI:
userimcache is Empty

EXE:
Session folders , with files

More: on my development EXE i have no userimcache folder

Eric

Re: userimgcache

PostPosted: 06 Apr 2016 18:38
by etwoss
Hi

Damn systemmanager, asked 5 times he was sure the dll has write access he said yes, but is was not! So now it can write.

Still question why userimgcache not filled in my development environment?

Eric

Re: userimgcache

PostPosted: 07 Apr 2016 10:19
by Alexander Bulei
Hi Eric,

The path for image cache files is composed of :

Code: Select all
ServerController.ContentPath + 'userimgcache' + WebApp.AppID


If you can't see the folder, thats means, the app doesn't have rights to write.

Best Regards.