1. Ganne Gannene
  2. PowerBuilder
  3. Wednesday, 14 February 2018 10:53 AM UTC

Hi all!

I have a client/server application of PB and I deploy it to powerserver web. It works fine, but I can't open a file (in wwwroot/appname dir) whit shellexecutea command.

Client/server script is

ShellExecuteA(0, "Open", ls_path_file, null, null, 0)  

how can I get the same result on the web?

How can i read a virtual path application?

Thanks in advance

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 14 February 2018 14:25 PM UTC
  2. PowerBuilder
  3. # 1

Hi Ganne;

  You can use the ShellExecute API from within your Web App but remember that the App (although stored in PowerServer) gets loaded and executed on the client PC's web browser. The client machine will not have access to the remote server unless you have some kind of UNC drive mapping going on. Which is another access possibility. BTW: Since PB 2017 is Unicode, you should be using the ShellExecuteW API and not the old ANSI one.

  Besides Marco's suggestion on using the PowerServer's FileServer mechanism to access remote files, you can also use a PB based Web Service (WS). The IIS based WS can then access the server's resources - in this case the file you are after - and then transfer the file contents back to the WS caller. In your case, that would be your Web App ( WS client). A variation on this would be to have the WS load the file contents into a TEMP Table blob column and let the Web App pull the contents from there using a SelectBlob command.

Food for thought.


Regards .. Chris


  1. Ganne Gannene
  2. Thursday, 15 February 2018 10:52 AM UTC
Hi Govinda,

              same sample of Bruce with PB 17 give me error "Illegal .NET Web Service type: There are no valid public functions that can be deployed as Dotnet web service methods.". does not want array structur as function argument.

  1. Helpful
  1. Ganne Gannene
  2. Thursday, 15 February 2018 13:45 PM UTC
Hi Govinda, Thanks, I solved the problem and it works fine.


  1. Helpful
  1. Ganne Gannene
  2. Friday, 16 February 2018 11:36 AM UTC
Hi Chris !

I used a PB Web Service to write blob in a temp table as you have suggest me.

Now, I have a standard application project in my pb app client/server. How do I add the Web service in this project?

I develop a test with web service proxy wizard project ... How do I get the same result on a "normal" project?

Thank you very much!


  1. Helpful
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Wednesday, 14 February 2018 12:30 PM UTC
  2. PowerBuilder
  3. # 2

Hi Ganne,

you cannot.

The function will be executed on the client machine, not on the server, because it is called from the generated Javascript code.

If you want to access files on the server side, one workaround is to use the AppeonFileService object from appeon_workarounds.pbl. 

Alternative approaches may involve the deployment of .NET Web Services from PB.




  1. Ganne Gannene
  2. Wednesday, 14 February 2018 17:19 PM UTC
Hi Marco,

      AppeonFileService is too complicated compared to my case.. Have you got a pb .net web services sample?

thanks in advance.


  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.