I have an issue using a very simple piece of ASP code below. The code takes a path, creates a file system object and then displays the filenames of files in the folder provided.
Firstly, here's the code (it is part of a more complicated application, but this is just a test page for it) :
strAttachDir = "\\fileserver\myfiles"
Set fso = CreateObject("Scripting.FileSystemObject"
Set folder = fso.GetFolder(strAttachDir)
Set files = folder.Files
For Each file in files
Response.Write "<p>" & file.name & "</p>"
Next
The fileserver and webserver are in the same domain (say MasterDomain), while I'm logged on using a user who exists in a different domain called OtherDomain (IIS is using Integrated Windows Authentication). If I run an IE browser on the webserver machine while logged in as the user from OtherDomain the list of files is displayed with no problem. However, if I run the browser on any other machine than the web server it returns error 76 Path not found. The asp code works fine only if it is run from a browser on the web server, even if that web server is not in MasterDomain.
Anyone any ideas on why I can't get the list of files if the browser is not being run on the web server? My initial thought was that I wouldn't have been able to do it because of the "cross domains" file access, so I don't understand the symptoms I'm getting.
Firstly, here's the code (it is part of a more complicated application, but this is just a test page for it) :
strAttachDir = "\\fileserver\myfiles"
Set fso = CreateObject("Scripting.FileSystemObject"
Set folder = fso.GetFolder(strAttachDir)
Set files = folder.Files
For Each file in files
Response.Write "<p>" & file.name & "</p>"
Next
The fileserver and webserver are in the same domain (say MasterDomain), while I'm logged on using a user who exists in a different domain called OtherDomain (IIS is using Integrated Windows Authentication). If I run an IE browser on the webserver machine while logged in as the user from OtherDomain the list of files is displayed with no problem. However, if I run the browser on any other machine than the web server it returns error 76 Path not found. The asp code works fine only if it is run from a browser on the web server, even if that web server is not in MasterDomain.
Anyone any ideas on why I can't get the list of files if the browser is not being run on the web server? My initial thought was that I wouldn't have been able to do it because of the "cross domains" file access, so I don't understand the symptoms I'm getting.