Scripting.FileSystemObject problems

P

PB4FUN

If I comment #2 to #5 no problems.
If I uncomment #2, #4 and #5 the page hangs.
Even did not reach the point to uncomment #3
So, whats wrong. Do i have to alter some serversettings, and if so, what
should be changed ?

OS : W2KP/IIS
CPU PII 350 MHz
Mem >500 MB

<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Dim objTextStream
const strFileName = "F:\FileShare\resume.txt"
const fsoForReading = 1
If objFSO.FileExists("F:\FileShare\resume.txt") then
#1
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFileName, fsoForReading)
#2
Response.Write "" & objTextStream.ReadAll & ""
#3
objTextStream.Close
#4
Set objTextStream = Nothing
#5
Response.Write strFileName & " was found."
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If

Set objFSO = Nothing
%>

Meindert, MCP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top