PDA

View Full Version : open file problem. IIS 5.0


Morgoth
08-29-2002, 08:34 AM
I am running IIS 5.0 with the security patch installed.

Before the scecurity patch was installed this open file script would work fine.
Now that I have the patch installed, it doesn't work and to get my IIS running correctly again I must restart my computer. (restarting IIS just doesn't do it)



<%
Set fso = CreateObject("Scripting.FileSystemObject")
Set myfile = fso.OpenTextFile("a.txt")
theinfo = myfile.ReadLine

myfile.close
Set myfile=nothing
Set fso=nothing
%>

WARNING: Usage of this code may stop your IIS server from running correctly and restarting your computer might be in order.
No other problems will occur. (from the best of my knowledge.)

Is there anyother way to open a file?
I have heard:

open "a.txt" for input as #1
input #1, string
close #1

This works in VB 6.0 but not ASP. I am missing and end of statemnt, maybe?

Well, I need to include and read the top line of a text file, so any code that will do this would be great.

Thank you all for reading this.

oracleguy
08-29-2002, 07:49 PM
I'm having a similar problem. It's probably because I installed the same patch...

Refer: http://www.codingforums.com/showthread.php?s=&threadid=5029

Perhaps it will work if you did it in ASP .NET... just a thought.

Morgoth
08-30-2002, 03:36 PM
I hate ASP.net cause it's different.
I'm a scripting racist... it's a bad habbit, but it's just so...

damn microsoft.