Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to enumerate files and directories

Status
Not open for further replies.

rewebb

Technical User
Dec 12, 2001
143
GB
We are trying to create a virtual directory on an IIS5 virtual server.

The virtual directory has "the content should come from a share located on another computer" checked and we type "\\fred\folder1" as the path. We enter a specific username and password (using the "Connect as" button)

However all we get is the following error message...

"Unable to enumerate files and directories because the following error occured:
Logon failure: unknown user name or bad password"

I know the username and password are valid. Both the server and the web server are in the same NT Domain - so it's not a trust issue.

To prove the username is valid I can map a share to \\fred\folder1 connecting as the same user account - that works OK.

What am I overlooking?
 
This works for me in both PWS (Win98) and ISS(Win2K).
It reads all of the files in a directory. This is done
is server side Java Script.

// Constructor constants

// DO NOT CHANGE THESE VARIABLES
this.firstBreakYear = 1979;
this.secBreakYear = 1985;
this.breakMonth = 3;
this.preBreakDrive = "M:/Playboy/Pbdb/Playmate/Portfolios/pb";
this.postBreakDrive = "N:/Playboy/Pbdb/Playmate/Portfolios/pb";
// DO NOT CHANGE THESE VARIABLES


// Constructor code

this.imagePath;

if (this.theYear <= this.secBreakYear && this.theMonth <= this.breakMonth)
{
this.imagePath = this.preBreakDrive + this.theMonth + this.theYear + &quot;/&quot;;
}
else
{
if (this.theYear <= this.firstBreakYear)
{
this.imagePath = this.preBreakDrive + this.theMonth + this.theYear + &quot;/&quot;;
}
else
{
this.imagePath = this.postBreakDrive + this.theMonth + this.theYear + &quot;/&quot;;
}
}

// Response.write(this.imagePath + &quot;<br>&quot;);

this.fileSystemObj;
this.fileFolderObj;
this.filesEnumerator;
this.filesArray;
this.fileObj;
this.i = 0;

this.fileSystemObj = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;);
this.fileFolderObj = this.fileSystemObj.GetFolder(this.imagePath);
this.filesEnumerator = new Enumerator(this.fileFolderObj.Files);
this.filesArray = new Array();

for (;!this.filesEnumerator.atEnd(); this.filesEnumerator.moveNext())
{
this.fileObj = this.filesEnumerator.item();

this.filesArray[this.i] = this.fileObj.Name;

// Response.write(this.filesArray[this.i] + &quot;<br>&quot;);

this.i++;
}


delete this.fileSystemObj;
this.fileSystemObj = null;


Everything I know I learned from The Grateful Dead and Buffy The Vampire Slayer
Charlie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top