472,142 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 software developers and data experts.

LoadPicture - problem!

Hello!

I've created a PDF report and trying to load a picture using
LoadPicture fucntion. It works fine on my computer but it gives an
error on some other computers - permision denied, or something similar.

Code:
----------
Dim myImg, fs
Set fs= Server.CreateObject("Scripting.FileSystemObject")
if not fs.fileExists(img) then exit sub
set myImg = loadpicture(img)
iWidth = round(myImg.width / 26.4583)
iHeight = round(myImg.height / 26.4583)
----------

File is found but when trying to load I get something like permision
denied.

img =
Server.MapPath("../../../")&Session("IG").getValue("UploadDir")&arr(30, i),"/","\")

Application is not stored in a directory different by the IIS's Home
directory. I have a virtual directory for accessing the application, I
don't know if this influences in some way.

Dec 21 '06 #1
5 4710
some web hosts won't allow this type of folder reference :

"../../../"
"Iulian Ilea" <iu*********@gmail.comwrote in message news:11**********************@f1g2000cwa.googlegro ups.com...
Hello!

I've created a PDF report and trying to load a picture using
LoadPicture fucntion. It works fine on my computer but it gives an
error on some other computers - permision denied, or something similar.

Code:
----------
Dim myImg, fs
Set fs= Server.CreateObject("Scripting.FileSystemObject")
if not fs.fileExists(img) then exit sub
set myImg = loadpicture(img)
iWidth = round(myImg.width / 26.4583)
iHeight = round(myImg.height / 26.4583)
----------

File is found but when trying to load I get something like permision
denied.

img =
Server.MapPath("../../../")&Session("IG").getValue("UploadDir")&arr(30, i),"/","\")

Application is not stored in a directory different by the IIS's Home
directory. I have a virtual directory for accessing the application, I
don't know if this influences in some way.

Dec 21 '06 #2

"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
some web hosts won't allow this type of folder reference :

"../../../"

It's called a parent path, by default IIS6 disables the use of parent paths.
Rather than enable this 'feature' use an absolute path instead.
Dec 22 '06 #3
please respond to the person who asked the question, not to the person who already provided the answer
"Anthony Jones" <An*@yadayadayada.comwrote in message news:u7****************@TK2MSFTNGP03.phx.gbl...
>
"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
>some web hosts won't allow this type of folder reference :

"../../../"


It's called a parent path, by default IIS6 disables the use of parent paths.
Rather than enable this 'feature' use an absolute path instead.


Dec 30 '06 #4

"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
please respond to the person who asked the question, not to the person who
already provided the answer
>
Please don't top post. Please don't do this and please don't do that.
Sheesh!

Dec 31 '06 #5
I said nothing about top posting .. actually I prefer it.
"Anthony Jones" <An*@yadayadayada.comwrote in message news:uZ**************@TK2MSFTNGP04.phx.gbl...
>
"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12*************@corp.supernews.com...
>please respond to the person who asked the question, not to the person who
already provided the answer
>>

Please don't top post. Please don't do this and please don't do that.
Sheesh!

Dec 31 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by KBrq | last post: by
117 posts views Thread by Peter Olcott | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
3 posts views Thread by cullens_aust | last post: by
5 posts views Thread by Shelby | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.