Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Server.Mappath Help

Reply
Thread Tools

Server.Mappath Help

 
 
Y2K
Guest
Posts: n/a
 
      06-26-2006
I have a thumbnail viewer which displays images on a webpage.
Currently, the images reside in a subfolder of the root, and this works
fine. I understand the main problem here is my limited knowlege of
ASP.

Here's the current setup:
c:\testproj\imageviewer = Virtual directory named "IMGviewer"
c:\testproj\imageview\upload\pics = folder that contains images


The following code works:
ImageConn = "pics/"
Set fso = CreateObject("Scripting.FileSystemObject")
'Set fattributes = fso.GetFolder(server.mappath(""&ImageConn&""))


The problem is, the images are in another folder:
c:\testfolder\myimages\pics_5


I've tried the following, and get a "path not found" error.
Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5\")
Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5")
Set fattributes =
fso.GetFolder("//servername/c$/testfolder/myimages/pics_5")
Set fattributes =
fso.GetFolder("//servername/c$/testfolder/myimages/pics_5/")


Can anyone tell me what I'm doing wrong? Thanks.


Y2K

 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      06-27-2006
On Mon, 26 Jun 2006 15:28:02 -0700, Y2K
<(E-Mail Removed)> wrote:

>I have a thumbnail viewer which displays images on a webpage.
>Currently, the images reside in a subfolder of the root, and this works
>fine. I understand the main problem here is my limited knowlege of
>ASP.
>
>Here's the current setup:
>c:\testproj\imageviewer = Virtual directory named "IMGviewer"
>c:\testproj\imageview\upload\pics = folder that contains images
>
>
>The following code works:
>ImageConn = "pics/"
>Set fso = CreateObject("Scripting.FileSystemObject")
>'Set fattributes = fso.GetFolder(server.mappath(""&ImageConn&""))
>
>
>The problem is, the images are in another folder:
>c:\testfolder\myimages\pics_5
>
>
>I've tried the following, and get a "path not found" error.
>Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5\")
>Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5")
>Set fattributes =
>fso.GetFolder("//servername/c$/testfolder/myimages/pics_5")
>Set fattributes =
>fso.GetFolder("//servername/c$/testfolder/myimages/pics_5/")
>
>
>Can anyone tell me what I'm doing wrong?


Trying to access a folder with an incorrect path.

Most likely the folder in question doesn't have permission for the
account accessing it.

Jeff
 
Reply With Quote
 
 
 
 
Y2K
Guest
Posts: n/a
 
      06-27-2006


"Jeff Cochran" wrote:

> On Mon, 26 Jun 2006 15:28:02 -0700, Y2K
> <(E-Mail Removed)> wrote:
>
> >I have a thumbnail viewer which displays images on a webpage.
> >Currently, the images reside in a subfolder of the root, and this works
> >fine. I understand the main problem here is my limited knowledge of
> >ASP.
> >
> >Here's the current setup:
> >c:\testproj\imageviewer = Virtual directory named "IMGviewer"
> >c:\testproj\imageview\upload\pics = folder that contains images
> >
> >
> >The following code works:
> >ImageConn = "pics/"
> >Set fso = CreateObject("Scripting.FileSystemObject")
> >'Set fattributes = fso.GetFolder(server.mappath(""&ImageConn&""))
> >
> >
> >The problem is, the images are in another folder:
> >c:\testfolder\myimages\pics_5
> >
> >
> >I've tried the following, and get a "path not found" error.
> >Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5\")
> >Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5")
> >Set fattributes =
> >fso.GetFolder("//servername/c$/testfolder/myimages/pics_5")
> >Set fattributes =
> >fso.GetFolder("//servername/c$/testfolder/myimages/pics_5/")
> >
> >
> >Can anyone tell me what I'm doing wrong?

>
> Trying to access a folder with an incorrect path.
>
> Most likely the folder in question doesn't have permission for the
> account accessing it.
>
> Jeff
>


Ok.. not having permissions is fine.. I can fix that. What's the correct
path? Are you saying I'm getting that error because the path cannot be found
due to insufficient permissions?

Y2k
 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Help Help Pentax S5i Help needed (Please) The Martian Digital Photography 14 06-20-2008 07:56 AM
HELP - HELP - HELP =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?= ASP .Net 4 03-09-2006 12:46 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 1 07-16-2004 01:12 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 0 07-16-2004 10:00 AM
HELP! HELP! HELP! Opening Web Application Project Error =?Utf-8?B?dHJlbGxvdzQyMg==?= ASP .Net 0 02-20-2004 05:16 PM



Advertisments