473,769 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access to Virtual Directory path using FileSystemObjec t and Server.MapPath fails

1 New Member
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_PATHNOTF OUND)"


oFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
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 7158
kenobewan
4,871 Recognized Expert Specialist
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
2209
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 = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder(CurrentPATH) Set oFolderContents = oFolder.Files
8
2236
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 of accessing my database using virtual directories, that is, for example if I was using html I could achieve this putting "..\..\bd\mydatabase.mdb".
16
11811
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 allow people to upload to a virtual directory. The directory may or may not exist on the same server as the Web site. I can't seem to figure out how to do this. If I pass the virtual
14
12728
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 Web Sharing is active. For example: my application is in "C:\Inetpub\wwwroot\MyApp", the Virtual folder is in "C:\VirtualFolder", and IIS sees it as if it were in "C:\Inetpub\wwwroot\MyApp\VirtualFolder".
9
3838
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 site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
24
5081
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 same code, except a different name for the file. The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Accident.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
1
9083
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 still cannot use any FSO to read it. Here is my code: <% Dim fs set fs=Server.CreateObject("Scripting.FileSystemObject")
5
7280
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 that virtual directory ? For my default project directory, i can get list of the specific files like that; *******************
8
2025
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 getting exception errors. Thanks. Dim strPath As String = Server.MapPath("~/OracleFiles") -David
0
9590
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9424
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10000
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9866
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.