Click to See Complete Forum and Search --> : TextStream problem on IIS


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

buntine
05-19-2004, 11:27 PM
Your code is fine.. Its strange that IIS crashes when you run this code.:confused:

vickers_bits
05-23-2004, 01:14 AM
ur antivirus software, probably norton, has script blocking on. turn it off and ur script wont cause iis to hang

buntine
05-23-2004, 01:45 AM
Norton cant stop server-side scripting. Can it?

I would be surprised, considering the code would be executed before the client receives its output. :eek:

Regards.

Alex C
05-26-2004, 08:00 PM
Looks like a permissions problem. Check that you have modify/write access to that "Server.Mappath" folder.


Regards,
Alex

buntine
05-26-2004, 10:20 PM
Possible, but that would cause a runtime error. It shouldnt crash his machine.

Alex C
05-26-2004, 10:48 PM
Hmm this is strange too. My IIS is now broken too. Won't load ASP pages and lags my machine. Works once if I restart the machine but then freezes back up again.


Alex