PDA

View Full Version : infinate loading - fso


ghell
04-07-2004, 04:16 PM
i dont know why its doing it but whenever i try to load any file that uses FSO it just keeps loading infinatlely (like infinate loops just never stop loading in the loading bar of the browser but then i can switch page and it works, unlike infinate loops)

even if i just have 2 lines on a file
<%Set fso = CreateObject("Scripting.FileSystemObject")
Set fileObject = fso.OpenTextFile(Server.MapPath("file.txt"))%>

it works fine when setting FSO but setting fileObject causes the problem i described earlier

Roy Sinclair
04-07-2004, 06:19 PM
Just for kicks try:

Set fso = Server.CreateObject("Scripting.FileSystemObject")

when you create the file system object to see if that allows the next call to work any better.

ghell
04-07-2004, 08:44 PM
nope, made no diff

Roy Sinclair
04-07-2004, 10:48 PM
Ok, then let's break out that line into it's two parts:


<%
Set fso = CreateObject("Scripting.FileSystemObject")
tempName = Server.MapPath("file.txt")
response.write "tempName=" & tempName & "<br>"
response.flush
Set fileObject = fso.OpenTextFile(tempName)
response.write "Finished"
%>


FWIW, I ran that code above on my own server and it works.

ghell
04-08-2004, 11:15 AM
yea, my first script works on every computer i have expept this 1 (and only since i formatted roughly 10 days ago hasnt it worked)
<%
Set fso = CreateObject("Scripting.FileSystemObject")
tempName = Server.MapPath("file.txt")
response.write "tempName=" & tempName & "<br>"
response.flush
'Set fileObject = fso.OpenTextFile(tempName)
response.write "Finished"
%>

i commented the line that still breaks it
i was wondering if there could be a persmission problem, i have write on in IIS 5.1 (scripts only) although i never needed write permissions for anything before. the annoying thing is i dont even get an error so i cant see why it wont load :(

Roy Sinclair
04-08-2004, 09:10 PM
You aren't running Norton AV on that machine are you? It's got a reputation for interfering with ASP pages that use the FileSystemObject.

ghell
04-09-2004, 10:57 AM
yea, nAV2004 pro, but i got corperate running on the server and nAV2002 running on the other comp i test on. i thought it may be ethe problem so i disabled autoprotect nad it made no difference, i dont know if uninstalling it would help

edit: i disabled the script blocking service and it worked but is there any way to just make it ignore scripts in 1 directory tree or something? i dont know where any documentation is but ironically the help file that comes with it isnt very helpful.

Roy Sinclair
04-13-2004, 11:04 PM
I've gotten really busy at work lately but you could try a Google search for other discussions about that problem to see if anyone has found a more complete answer. The AV software I have is from Trend Micro so I don't have any experience with the Norton.

dgeorgita
07-28-2005, 04:50 PM
Hello,
I have the same problem on IIS 5.1

These 2 lines of code never stop running:
<%
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fileObject = fso.OpenTextFile(Server.MapPath("file.txt"))
%>
The problem is not raised by
Set fso = Server.CreateObject("Scripting.FileSystemObject")
(which is ok if let alone on the page), but it's from opening the text file.

Has anyone found a solution to this issue? I mean, does anyone know what triggers this strange behaviour. It's a configuration / conflict problem ?
(Just to let you know, IUSR_[MachineName] has full rights on that folder.

Thank you,
Dragos

neocool00
07-29-2005, 07:43 PM
ghell,
When you write out the path to the file (i.e. response.write "tempName=" & tempName & "<br>"), what is the path that it is displaying? Also, in order to open a file, either the IUSER or IWAM account needs read/write permissions.