473,761 Members | 10,365 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 9086

<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
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
3
5048
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 right once in permission setting and
7
2395
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") objIIS.Create("IISWebVirtualDir", strVirtualDirectoryName)
5
2937
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
8584
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 during the execution of the current web request. Please review the stack trace for more information...
8
2539
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 both run. I have tried running the 1.1 application under 2.0 but there are some controls used in...
2
1471
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
2337
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
7155
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 named CD and inside the website folder I have a Virtual Directory (Moozik) with the location set to...
0
9531
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
10115
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...
0
9957
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9905
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
9775
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
7332
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
5229
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...
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
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.