zingmatter
05-19-2004, 05:39 PM
I have a simple script that will output lines from a text file using this code:
strFileName = Server.MapPath("testtext.txt")
Set filesys = CreateObject("Scripting.FileSystemObject")
Set testfile = filesys.OpenTextFile(strFileName, 1)
do while not testfile.AtEndOfStream
txtLine = testfile.ReadLine
txtOut = txtOut & txtLine & "<br>" & vbNewLine
loop
testfile.close
set testfile = nothing
response.write(txtOut)
This works fine when uploaded to my ISP. But when I try to run it on IIS on my PC it bungs up my IIS and have to restart it.
Is there something I'm doing wrong?
Any help greatly appreciated
Thanks
strFileName = Server.MapPath("testtext.txt")
Set filesys = CreateObject("Scripting.FileSystemObject")
Set testfile = filesys.OpenTextFile(strFileName, 1)
do while not testfile.AtEndOfStream
txtLine = testfile.ReadLine
txtOut = txtOut & txtLine & "<br>" & vbNewLine
loop
testfile.close
set testfile = nothing
response.write(txtOut)
This works fine when uploaded to my ISP. But when I try to run it on IIS on my PC it bungs up my IIS and have to restart it.
Is there something I'm doing wrong?
Any help greatly appreciated
Thanks