Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 13th, 2004, 08:04 PM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default network directory listing using FileSystemObject?

Greetings,
I'm new to ASP and would like some advice. I'm trying to list the directory contents of a network directory on my website. Doing some research on the web, I found a tutorial here: http://www.asp101.com/samples/dir_list.asp

Unfortunately, this only works with listing contents for directories on the local machine. Then I found this page that tells me I need to make sure the anonymous account on the remote computer matches up with the account my webserver is using to access that remote directory: http://www.4guysfromrolla.com/webtec...ect/faq6.shtml

I followed the link within that page to an MS support page (http://support.microsoft.com/default...b;EN-US;197964) to find that this solution is for an NT4.0 network environment.

We're running Active Directory. Is it possible for me to access and display a remote directory listing within an Active Directory network?

Here's part of my code (basically taken from asp101.com's site):
<%
Dim strPath
Dim objFSO
Dim objFolder
Dim objItem

strPath = "\\hamster\Inetpub\wwwroot\Intranet\operations\ops _memo\"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strPath)
%>

Many thanks,
-long
[email protected]
 
Old December 15th, 2004, 12:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

The same thing applies to other windows versions, not just NT4. Basically you need to make sure the user account under which your asp page is running has rights to the network files. So either
1. create a matching local user account (with a matching password) on the network machine and give it rights to the folder you want, or
2. change your site config so it uses an existing network account that already has access to the folder you want





Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing shared network folders in Java ravishakya Pro Java 0 September 7th, 2006 10:06 AM
Listing of Directory Content ram_dwivedi Javascript 3 December 9th, 2005 05:13 AM
FSO directory listing spinout Classic ASP Components 4 November 7th, 2004 03:18 AM
Directory Listing Bleetz Pro JSP 1 September 20th, 2003 06:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.