Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP read/write file is not working

Status
Not open for further replies.

meph92

Technical User
Jun 3, 2002
1
GB
I am trying to get asp to read or write to a file.
All I am getting from IE is the flag/globe in the top right corner moving. Both on the server and workstation pc`s
And then iis has to be restarted.
All of the other asp projects I have done work fine.(
I have used code from and and
<html>
<body>
<p>This is the text in the text file:</p>
<%
Set fs=Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)

Set f=fs.OpenTextFile(Server.MapPath(&quot;testread.txt&quot;), 1)
Response.Write(f.ReadAll)
f.Close

Set f=Nothing
Set fs=Nothing
%>
</body>
</html>

All of which cause the problem as described.

I am using WindowsXP Pro. With read and write set
Help!
 
meph92,

Your code I think works fine. I tested it on my system and it would not write the text to the screen when I tried using adovbs.inc as the file to open and read.

When I used another plain text file, it worked fine. You may want to check the contents of your input file and make sure it doesn't contain any ASP or HTML code in it.

fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top