Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 21st, 2006, 03:25 PM
Iulian Ilea
Guest
 
Posts: n/a
Default 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.

  #2  
Old December 21st, 2006, 05:05 PM
Jon Paal
Guest
 
Posts: n/a
Default Re: LoadPicture - problem!

some web hosts won't allow this type of folder reference :

"../../../"


"Iulian Ilea" <iulian.ilea@gmail.comwrote in message news:1166714335.574070.235270@f1g2000cwa.googlegro ups.com...
Quote:
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.
>

  #3  
Old December 22nd, 2006, 08:45 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: LoadPicture - problem!


"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12olfglitf94r1c@corp.supernews.com...
Quote:
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.


  #4  
Old December 30th, 2006, 09:45 PM
Jon Paal
Guest
 
Posts: n/a
Default Re: LoadPicture - problem!

please respond to the person who asked the question, not to the person who already provided the answer


"Anthony Jones" <Ant@yadayadayada.comwrote in message news:u7%23B5igJHHA.1240@TK2MSFTNGP03.phx.gbl...
Quote:
>
"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12olfglitf94r1c@corp.supernews.com...
Quote:
>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.
>
>

  #5  
Old December 31st, 2006, 03:55 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: LoadPicture - problem!


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



  #6  
Old December 31st, 2006, 07:55 PM
Jon Paal
Guest
 
Posts: n/a
Default Re: LoadPicture - problem!

I said nothing about top posting .. actually I prefer it.


"Anthony Jones" <Ant@yadayadayada.comwrote in message news:uZBCQLPLHHA.1424@TK2MSFTNGP04.phx.gbl...
Quote:
>
"Jon Paal" <Jon nospam Paal @ everywhere dot comwrote in message
news:12pdmr0i7ubtgec@corp.supernews.com...
Quote:
>please respond to the person who asked the question, not to the person who
already provided the answer
Quote:
>>
>
Please don't top post. Please don't do this and please don't do that.
Sheesh!
>
>
>

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles