1. Lloyd McBean
  2. PowerBuilder
  3. Friday, 6 September 2019 23:07 PM UTC

I have a PB2017 application working over RDP using TSPlus (An RDP Alternative) and which works extremely well.  I am now testing an integration which requires saving files from the RDP session to drives on the client-side.  FileOpen calls fail every time with -1.  Even FileExist(filename) fails everytime.

This PB application works perfectly when the run locally. 

I have checked security (Everyone is given access to the folder in question). 

What could be causing this file i/o issue? 

Part of the app allows export to Excel, and this actually creates the file on the client-side but writes at an extremely slow rate.  Am I missing something?

Accepted Answer
Lloyd McBean Accepted Answer Pending Moderation
  1. Saturday, 7 September 2019 01:21 AM UTC
  2. PowerBuilder
  3. # Permalink

Solved.

When mapping file paths form RDP Clients the drive needs to be mapped as follows:

Local Drive Letter R:

Local Folder: folder_name

Path mapping 
\\tsclient\R\folder_name\

Comment
  1. Michael Kramer
  2. Saturday, 7 September 2019 11:40 AM UTC
THX for sharing your solution to everyone's future benefit. Appreciate! /Michael
  1. Helpful
There are no comments made yet.
Lloyd McBean Accepted Answer Pending Moderation
  1. Friday, 6 September 2019 23:41 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Chris for the response.

I have set full read-write to Everyone just to be sure.

Even the FileExist function fails.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 6 September 2019 23:33 PM UTC
  2. PowerBuilder
  3. # 2

Hi Lloyd;

   I wonder if the file permissions are currently "read only" whereas, your App needs "write" permission as well on the target drive & folder?

Regards ... Chris

Comment
  1. Lloyd McBean
  2. Saturday, 7 September 2019 00:43 AM UTC
ok. So I solved it. when connecting via the RDP client the mapping is different.

Example mapping to R: Drive on client, the drive needs to be mapped as follows:

\\tsclient\R\folder\filename.xyz.



I used the GetFolder function to reveal what the application was reading when browsing and picking up the path.

Problem Solve!

Thanks.



  1. Helpful
  1. Chris Pollach @Appeon
  2. Saturday, 7 September 2019 00:49 AM UTC
If Excel & SaveAs() command can work - then the FileOpen & FileExists commands should also work.

BTW: when you compiled the EXE, did you include a Manifest (Project Painter)?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Saturday, 7 September 2019 01:01 AM UTC
Excellent .. great detective work Lloyd!
  1. Helpful
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.