473,569 Members | 2,848 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP Virtual Directory GetFolder Error

Hi,

We have a webpage browsing folders within the wwwroot. We need to
access a remote shared directory the same way.

We created a virtual directory in IIS with an alias pointing on this
remote directory. The virtual directory is accessible when we type it
in the address bar of IE but when we try accessing it with a
Scripting.FileS ystemObject.

I wonder what is missing or what we are doing wrong.

Accessible :
http://<server-name>/<alias>
(I can browse the directory, download files, etc)

Not accessible :
Set fsoFolder = objFSO.GetFolde r(Server.MapPat h("<alias>"))
or
Set fsoFolder = objFSO.GetFolde r("\\<remote-server-name>\<remote-
directory>")
or
Set fsoFolder = objFSO.GetFolde r("http://<server-name>/<alias>")

When I tried these I got :

Server object error 'ASP 0177 : 800a004c'

Server.CreateOb ject Failed

/xslamweb/test-website/asp/xdsl_test.asp, line 43

The operation completed successfully

43 Set fsoFolder = objFSO.GetFolde r(Server.MapPat h("../../Ltdocs/"))

Can you please help me solve this problem.

Decoy

Jun 14 '07 #1
4 9076

<ls******@gmail .comwrote in message
news:11******** *************@x 35g2000prf.goog legroups.com...
Hi,

We have a webpage browsing folders within the wwwroot. We need to
access a remote shared directory the same way.

We created a virtual directory in IIS with an alias pointing on this
remote directory. The virtual directory is accessible when we type it
in the address bar of IE but when we try accessing it with a
Scripting.FileS ystemObject.

I wonder what is missing or what we are doing wrong.

Accessible :
http://<server-name>/<alias>
(I can browse the directory, download files, etc)

Not accessible :
Set fsoFolder = objFSO.GetFolde r(Server.MapPat h("<alias>"))
or
Set fsoFolder = objFSO.GetFolde r("\\<remote-server-name>\<remote-
directory>")
or
Set fsoFolder = objFSO.GetFolde r("http://<server-name>/<alias>")

When I tried these I got :

Server object error 'ASP 0177 : 800a004c'

Server.CreateOb ject Failed

/xslamweb/test-website/asp/xdsl_test.asp, line 43

The operation completed successfully

43 Set fsoFolder = objFSO.GetFolde r(Server.MapPat h("../../Ltdocs/"))

Can you please help me solve this problem.

Decoy
The problem is that when you create the alias on a UNC path IIS would have
asked you to enter some domain credentials that it will use when attempting
to access the folder. Hence instead of using the IUSR_<machinena mewhen
accessing anything in the alias folder IIS will use the provided
credentials.

Other code in your website won't benefit from this behaviour hence
attempting to use FSO to open the remote folder fails because the current
user underwhich the script is running doesn't have access to the folder.

Note also parent paths "../../" are disabled by default in IIS6.

The only simple solution I know of is to change the anonymous user account
to a domain account that has been granted access to the share. You can
limit this change to this one ASP page if you prefer.


Jun 14 '07 #2
Unfortunatly, this alternative seem to displease the security audit
department.

I tried as an alternative solution to map a drive from the webserver
to the fileserver. It worked fine, I can call objFSO.GetFolde r("v:\"),
but as soon as I logoff, the drive is no longuer available.

Is there a way to create a permanent mapped drive ?

Jun 14 '07 #3

<ls******@gmail .comwrote in message
news:11******** ************@x3 5g2000prf.googl egroups.com...
Unfortunatly, this alternative seem to displease the security audit
department.

I tried as an alternative solution to map a drive from the webserver
to the fileserver. It worked fine, I can call objFSO.GetFolde r("v:\"),
but as soon as I logoff, the drive is no longuer available.

Is there a way to create a permanent mapped drive ?
Not that I know of but those clever guys in the security audit dept might
know?

You might ask them to justify their reasons for their 'displeasure' since I
see no reason why a single page that needs access to a file share shouldn't
be granted access to the file share. Utlimately for the app to work some
way to enable this has to be found. Since the solution I offered doesn't
open up holes to anywhere else I don't see their problem. I suspect they
haven't understood the requirement or the limited scope of access we are
talking about.

Are your users internal (IOW, are your users managed but the same security
audit dept that manages the server).

If so perhaps they can place all the users that require access to the remote
folder in a Group and grant that group the appropriate rights on the share
and folder contents. Turn off anonymous access on the ASP pages and turn on
windows integerated. Make sure each user has the server name added to their
browsers Intranet Zone which allows automatic use of NTLM. (In Firefox use
about:config setting network.automat ic-ntlm-auth.trusted-uris).

Now when the users hit that page they will be automatically authenticated
and the ASP script will run under their security token. Since they've been
granted access the remote folder the FSO code will work.

However utlimately my original recommendation still stands, you need to make
the security audit deptarment accountable by asking for definitive reasons.

Jun 15 '07 #4
I think I get you all wrong the first time.

I will try your solution. The only problem I see is that my hands are
tied by a complex ticket system I need to wait for an IT guy to do it.

Thanks for your help.

Jun 15 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2198
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
3
5037
by: Kay | last post by:
IIS cannot read files in a directory reporting that : Microsoft VBScript runtime (0x800A01B6) Object doesn't support this property or method: 'Fso.GetFolder' This has to do with Scripting.FileSystemObject. I make sure the scrrun.dll is properly registered with regsvr32. Still the problem persists. Previously I do not know what I did...
7
2382
by: Jaydeep | last post by:
Hi, Anybody knows how to create virtual directory programmatically under root directory ofcourse from code-behind. I am developing web-based application where I need to create a folder and making this folder as virtual directory in IIS. I know in ASP how to do it. Set objIIS = GetObject("IIS://localhost/W3SVC/1/Root")...
5
2924
by: Stu Carter | last post by:
Hi, ENV: Windows 2003 Server SP1 (+all updates), VS 2003, .Net 1.1 SP1 We've got an ASP.Net web application using State Service. All is fine until we tried to use the app through a virtual directory with a space in it. e.g. 'http://localhost/My%20App'. The following exception is thrown: ----------
1
8525
by: Dave | last post by:
I am getting te following error in a ASP.Net app that is running on Win XP Pro (SP2): Server cannot access application directory 'C:\Documents and Settings\dave\My Documents\My Visual Studio ASP.NET\MyWebSite\'. The directory does not exist or is not accessible because of security settings. Description: An unhandled exception occurred...
8
2526
by: Nate | last post by:
I am running on Window 2003. I have a website built in ASP.NET 2.0. I need to have a Virtual Directory running an application in 1.1. I have configured each in its own Application Pool. The 1.1 application picks up and parses the 2.0 web.config. It is complaining about the connectionstrings node. If I comment out that node the applications...
2
1462
by: tshad | last post by:
I have set up a Virtual Directory underneath my normal Web Site in IIS 6 for 2 of our sites. One of them works file. The other one is giving me an error: **************************************************************************** Parser Error Message: The module 'ScollKeeperModule' is already in the application and cannot be added again
12
2324
by: Pao | last post by:
Hi all For all NEW sites (virtual directories) that I create, I receive always the same error: (I translate so may be a little different) Impossible to visualize the XML page Impossible to visualize the XML input through the XSL sheet. Correct the error, then click on Update, or try another time.
1
7128
by: jbonifacejr | last post by:
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...
0
7704
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...
0
7620
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...
0
7931
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. ...
0
8139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7684
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...
0
6298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3666
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...
1
2120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.