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.
Thanks,
Michael
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.
Michael