vihv
07-06-2004, 04:37 AM
Hi there, I'm having a hard time to open/write to a txt file from a .asp, the code is right, but, looks that the iis 5.0 is messing with the file system.
once the execution gets to the point of :
Set filetxt = filesys.OpenTextFile(sFilePathAndName, ForReading, False)
the browser just hangs forever, If I do the request to the same .asp several times then the IIS hangs, and can not even stop the service(a bug in IIS).
I'm running w2k pro, w/IIS 5.0
Here is the code, any help is fully appreciated:
<%
Const fsoForAppend = 8
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Open the text file
Dim objTextStream
Set objTextStream = objFSO.OpenTextFile("C:\Welcome.txt", fsoForAppend)
'Display the contents of the text file
objTextStream.WriteLine "Hello, World!"
objTextStream.WriteLine "This is fun!!"
'Close the file and clean up
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing
%>
once the execution gets to the point of :
Set filetxt = filesys.OpenTextFile(sFilePathAndName, ForReading, False)
the browser just hangs forever, If I do the request to the same .asp several times then the IIS hangs, and can not even stop the service(a bug in IIS).
I'm running w2k pro, w/IIS 5.0
Here is the code, any help is fully appreciated:
<%
Const fsoForAppend = 8
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'Open the text file
Dim objTextStream
Set objTextStream = objFSO.OpenTextFile("C:\Welcome.txt", fsoForAppend)
'Display the contents of the text file
objTextStream.WriteLine "Hello, World!"
objTextStream.WriteLine "This is fun!!"
'Close the file and clean up
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing
%>