08-25-04 10:58 PM
I am learning to use ASP on IIS 6 under Windows XP.
When I came to the FileSystemObject I found IIS hangs on OpenTextFile.
(no problem when scripting on the Client!)
I couldn't find anything on Technet.
I find that I can use folderExists
but not getFolder
I can use GetFileName
but not GetFile
and not OpenTextFile
(I've tried using Fat32 and NTFS and different drive letters but to no avail
.
I've turned off Norton antivirus and set my IE security settings to Low.)
I'm using the Script Debugger and executing one command at a time and it
hangs consistently on binding to a file.
I then have to reboot my PC in order to be able to use IIS.
------------------------
This works:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Stop
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists("H:\Downloads") then
Response.Write("<br>There is a folder named \Downloads")
End if
fln = fso.GetFileName("H:\Downloads\test.txt")
Response.Write(fln & "<br>")
</SCRIPT>
(The Stop is to activate the Debugger)
---------------------------------------
These don't work
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Stop
Set fso = Server.CreateObject("Scripting.FileSystemObject")
If fso.FolderExists("H:\Downloads") then
Response.Write("<br>There is a folder named \Downloads")
set objFolder = fso.getFolder ("H:\Downloads")
' fails here
Response.Write("<br>Have bound to folder named \Downloads")
End if
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Stop
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fln = fso.GetFileName("H:\Downloads\test.txt")
Response.Write(fln & "<br>")
set objFile = fso.GetFile ("H:\Downloads\test.txt")
' fails here
Response.Write("<br>Have bound to file named test.txt")
</SCRIPT>
--------------------------------
Any ideas?
Victor
[ Post a follow-up to this message ]
|