PDA

View Full Version : FSO hangs IIS on any read/write


dlconnor
10-11-2002, 10:23 PM
I have been trying to resolve this for over a week and am getting nowhere. I am pretty sure it is a function of my machine configuration, permissions, or something local but I have tried changing everything I can think of and no movement.

I can get and FSO object and read drive properties, but eveytime I try to get, create, or take any actions on a folder or a file the page starts to load and stalls, hanging IIS. All I can do is restart IIS.

It's not the ASP code. I can run the same code on the ISP server and it works fine. And, I tried using the MS samples and they won't run on my machine.

I run XP Pro on a Dell Inspiron 8100 512K 1.2 MHz machine.

MY example - this code will hang IIS:

<html><head></head>

<body>
<%
dim fs, rs
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set rs = fs.GetFile(Server.MapPath("default.asp"))
%>
This file was last modified on: <%response.write(rs.DateLastModified)
Set rs = Nothing
Set fs = Nothing
%>

</body></html>

Any help will be appreciated.

Roy Sinclair
10-11-2002, 10:31 PM
Add some text and a response.flush call to ensure the text reaches the browser after each action with the file system object and see if you can narrow it down to a single line.

dlconnor
10-11-2002, 10:55 PM
I had tried a number of sequential steps with debug writes before and found that it always hangs on the getfile, createfile, whatever calls.

I did as you suggested in this example and it hung on the getfile.

I got the first two prints, but not the third.

<html><head></head>

<body>here
<%
dim fs, rs
Set fs = Server.CreateObject("Scripting.FileSystemObject") %>
now here

<%response.flush
Set rs = fs.GetFile(Server.MapPath("default.asp")) %>
get here?

<%response.flush
%>
This file was last modified on: <%response.write(rs.DateLastModified)
Set rs = Nothing
Set fs = Nothing
%>

</body></html>