
VBScript Path Not Found Error when running in IIS
Can anybody shed some light on the following error i'm having ???
When I run the following code as an ASP page it fails with the
following
error:
Microsoft VBScript runtime (0x800A004C)
Path not found
Line 4
Yet when I run it as a VBScript it works fine ???
I'm assuming this error has somthing to do with network security
running under IIS as when I change the folder path to a local non
mapped network drive the code executes without problems.
Regards -Ben
---[ Begin Code ]--------------------------------------------
01. Dim objFSO, objFolder, objSubFolder
02.
03. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
04. Set objFolder = objFSO.GetFolder("\\svr-file\admin")
05.
06. Response.Write("Size: " & objFolder.Size & "<br>")
07.
08. Set objSubFolder = objFolder.SubFolders
09. Response.Write("Number of Folders: " & objSubFolder.Count &
"<br><br>")
10.
11. For each objFolder in objSubFolder
12. Response.Write("Folder: " & objFolder.Name & "<br>")
13. Next
---[ End Code ]------------------------------------------------