473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Access to Virtual Directory path using FileSystemObject and Server.MapPath fails

I am unable to use the GetFolder method of the FileSystem object when
trying to get the folders from within a Virtual Directory. Here is my
setup...

I have a Development Box (DB) and a WebServer (WS) and a separate file
server (FS). On FS, I have a share with permission for Everyone set to
Read. On my DevBox I have a website in IIS named CD and inside the
website folder I have a Virtual Directory (Moozik) with the location
set to \\FS\ShareName. All of this is on a home network, not a domain.


When I run the following code, I am shown the error message "Exception
from HRESULT: 0x800A004C (CTL_E_PATHNOTFOUND)"


oFSO = Server.CreateObject("Scripting.FileSystemObject")
sPath = Server.MapPath("Moozik\")
fRoot = oFSO.GetFolder(sPath)


This is the first time I have ever tried to use virtual directories. I
do not know what kinds of permissions I need to set in IIS on the
Virtual Directory. One thing I did try was to go in and change the
IUSR_Servername anonymous account to ASPNET. I also checked the
Integrated Windows Authentication checkbox. But, even when I did not
have the Integrated Authentication box checked, I got the same error.


One strange thing is that if I open a browser and navigate to "http://
localhost/cdcosmos/Moozik/Gary Hoey/Animal Instinct/Texas Son.wma


I am able to get the song to play in Media Player. So, it is obvious
to me that IIS knows that the folders are there and is able to
navigate them, but I don't know why I can't get the code to work.


Any ideas? Do I need to create an entry of some kind in my .config file?
May 2 '07 #1
1 7110
kenobewan
4,871 Expert 4TB
I don't believe that this is IIS problem. The problem appears to be with the server mapath location. HTH.
May 3 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: bart plessers | last post by:
Hello, Currently I am developping a internet "directory browser" My page 'default.asp' has following entries: CurrentPATH = Request("MyLink") Set oFSO =...
8
by: And | last post by:
Hi everyone my database is in a folder inside the inetpub folder (c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder inside the wwwroot folder. My question is: Is there a way...
16
by: B Letts | last post by:
Hi - I'm currently using the FileUpload control to allow people to upload files to my website. This all works fine, as long as I'm going to a physical path on my server. However, I need to...
14
by: Lorenzo | last post by:
Hello, I have a web application with a virtual directory in it. With 'virtual directory' i mean a folder whose physical path is different from the physical path of the application, but in which...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
24
by: dancer | last post by:
Using ASP.net 1.1 and Microsoft Access. I received the following error message. Why? I have closed the Access file. I have another very small access file that opens with no trouble with the...
1
by: tanya.wang | last post by:
I want to access files from a remote server so I mapped it in my server under z:\ for \\myserver\web\mysite\images\ I added this UNC path to my IIS virtual directory and name it as "upload" but I...
5
by: Ned White | last post by:
I have set up a virtual directory on ISS 6.0 to store the all .jpg and .swf files which i use in my project It is alias name is "OutSrc" Is it possible to acquire a list of files which exist in...
8
by: David C | last post by:
Is the sample below valid for referencing a virtual folder named OracleFiles in a web site where the aspx page that is using this code is under the root folder of the subweb? Some users are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.