1. Michael Hartnett
  2. PowerBuilder
  3. Monday, 13 March 2017 16:06 PM UTC

Hi All,

I am new to creating PB Web Services so forgive the question.

I have created a .NET Web Service in PB Classic.  The intention is that it will retrieve the filepath for an image from a DB, resize and save it into a folder structure.  I am using the Imagemagick OLE dll on my Webserver to try to do this.

So far I have been able to establish my DB connection and retrieve the filename and filepath from the DB.

The problem I have is that when I use DirectoryExists() to validate the path for the file the WebService is returning FALSE.  I know the directory exists as I can browse to it via Windows Explorer.  I am storing the UNC path in the DB, e.g. \\Fileserver\development\Images\xxx

The DirectoryExists() also returns FALSE if I try to validate a folder on the local machine.

Am I missing permissions in this case or should I be looking at a different way to validate the directory and access the files?

This may be the first of many stumbling blocks, but am hoping that if I can get over this one things should move on quickly.



AFIC Cephei Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2017 08:36 AM UTC
  2. PowerBuilder
  3. # 1

there's a [Checklist for deployment] in pb's help.

you can find help at

start-> All Programs ->sybase->powerbuilder xx.x->Compiled HTML Help File

then you will see the Checklist by searching "Checklist for deployment" keyword

good luck.


There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 13 March 2017 17:25 PM UTC
  2. PowerBuilder
  3. # 2

The built-in IUSR account is meant for anonymous access for visitors to websites hosted by IIS. It is possible to change anonymous to a specific user account in IIS Manager. Make sure you create a domain account specifically for this purpose and give it the minimum permissions needed for the web service and also make sure it has a proper password.

  1. Michael Hartnett
  2. Tuesday, 11 April 2017 01:36 AM UTC

Thanks Roland,

Forgive the silly question, but how or where exactly in IIS should I be updating the user?

Do I need to update the Application Pool or the Website?


  1. Helpful
There are no comments made yet.
Chris Pollach Accepted Answer Pending Moderation
  1. Monday, 13 March 2017 16:43 PM UTC
  2. PowerBuilder
  3. # 3

Hi Michael;

   Yes, this is a difficult area as your running inside of the Web / Application Server as an internal thread of that system.  Your WS can easily access folders within your Web Service's "session" folder but not outside that realm by default.

   You can change this access privilege by either adding your IIS's account to the external folder's privilege and/or switching the WS's Application Pool to one that has higher O/S' privilege. This usually works great for folder within the IIS's machine.

   For UNC access though, you may need to also need to add this path to your IIS's privileges (aka IIS_USR account). The other alternative is to "hand off" the file handling request to another PB application.EXE. The separate EXE (Initiated from the WS) can now have higher O/S privileges to perform more restrictive I/O functions.

FYI: I built a whole system around ImageMagicK, WS's & IIS and made a presentation of this at the last PB Conference ... http://powerbuilder-world-tour.com/download/NCPBUG-Conference-May2015-Pollach-WebImaging.pdf

FWIW:  You can PM me directly if you want and I can share some code & more experiences.


Regards ... Chris

Appeon: Director, Developer Relations.

  1. Michael Hartnett
  2. Tuesday, 11 April 2017 01:32 AM UTC

Hi Chris,

Thanks for the suggestions.  Unfortunately, I have not been able to get the UNC File access to work from IIS and thinking long term it may open up other security concerns for my client, so considering a different approach.

You kindly sent me your Image WebService shortly after the NCPBUG conference in 2015.  I can see from the code that you are storing and retrieving your images as BLOBs in your DB.  Do you know if there is a way that I can pass a BLOB to a Web Service, as our clients are storing their images on physical storage as opposed to within a DB.

My thoughts on my workflow would be as follows:

To save and convert the original Image file to a BLOB in my Desktop App and pass it to my webservice.

The webservice will write a file based on the BLOB to the Temp folder on the IIS machine

I will use the Imagemagick tools to resize 2 alternate versions within this folder.

Resized images to be passed back to my Desktop App as BLOBs.

Desktop App will write the files to the UNC path as required, using the BLOB data.

Do you know if it is possible to pass a BLOB datatype to a PB Webservice and also to pass BLOB data back?

I see from your Web Service that you are calling the command line version of the Imgemagick tool set.  What version of Imagmagick are you using and where have you installed it in relation to the webservice?

Does it just require a full install on the IIS PC and let the PATH pick up the location, or do you need to copy the command line tools into an accessible IIS folder?

Thanks in advance for any suggestions or help.


  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.