I have a couple virtual directories in IIS 7.5 that point to network resources. Specifically, these folders hold PDF files. I've granted a user permission to these folders, and their contents are accessible via web requests as I would expect. For example, http://mysite/dir1/test.pdf
works perfectly for both virtual directories. However, when I try to expand one of the virtual directories (the other works fine) to see sub folders, IIS Manager becomes unresponsive almost immediately.
I'm attempting to list the file names of all PDFs in virtual directory on a classic ASP page.
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
filepath = Server.MapPath("/resources/myfolder")
Set folder = objFSO.GetFolder(filepath)
For Each file in folder.Files
If file.Type = "PDF File" Then
Response.Write("<p>" & file.Name & "</p>")
End If
End If
Set folder = Nothing
Set objFSO = Nothing
On a separate page, I using identical code to list the contents of another virtual directory. However, this other directory (as with IIS Manager) causes problems by not responding. It causes the entire site to become unresponsive and I have to recycle to app pool to get it to come back.
The effective permissions for the user account used to access these resources are identical. All files are accessible, and I've confirmed they exist via hardcoding fso.FileExists(filepath & filename)
. I've also confirmed that the folder object exists and it's properties are being set. Even the folder.Files.Count
is set properly in both cases. The issue is that the call to iterate through folder.Files
causes the unresponsive behavior. Are there file size and/or folder size limitations? The only difference I see between the two directories is the number of files and consequently the size of the folder. The one that doesn't work is just over 1GB.