473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problems with ASP Script

c
I have the following very simple script which works on my desktop (XP-PRO &
IIS5.1) but does not work on my laptop with the same config. It also works
on other configurations without a problem. I have tried re installing IIS
which has not made any difference. The script gets to the line annotated
"'This is where it breaks" and at this line the script simply hangs with no
error message at all.

I would guess this is some kind of config problem but I have tried comparing
a system that works against this one but haven't been able to find any
differences.

Any help/guidance would be appreciated.

..cw.

Script is as follows:-

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<html>

<head>

<title>Read Text File</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body bgcolor="#CACAFF">

<%

Dim fs,readfile

'Now read back the the data

response.write "reading data from file"

Set fs = CreateObject("Scripting.FileSystemObject")

filename=server.mappath("Information.txt")

response.write "-----" & filename &"-----"

'response.flush

Set readfile=fs.OpenTextFile(filename,ForAppending,Tru e)'this is
where it breaks

response.write "FS Open created OK"

Do until readfile.AtEndOfStream

response.write "<br>"

%>

<%

Text=readfile.readline

If Text="" then

response.write "<p>"

Else

response.write Text

End If

Loop

readfile.close

set readfile=nothing

%>

</body>

</html>
Jul 19 '05 #1
4 3642
http://www.aspfaq.com/2180

"c" <cl***@force9.co.uk> wrote
hangs with no error message
Set readfile=fs.OpenTextFile(filename,ForAppending,Tru e)

Jul 19 '05 #2
c
My error the code example was wrong (finger trouble) the code is ....

<html>

<head>

<title>Read Text File</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body bgcolor="#CACAFF">

<%

Dim fs,readfile

'Now read back the the data

response.write "reading data from file"

Set fs = CreateObject("Scripting.FileSystemObject")

filename=server.mappath("Information.txt")

response.write "-----" & filename &"-----"

'response.flush

Set readfile=fs.OpenTextFile(filename,1,True)'this is where it
breaks

response.write "FS Open created OK"

Do until readfile.AtEndOfStream

response.write "<br>"

%>

<%

Text=readfile.readline

If Text="" then

response.write "<p>"

Else

response.write Text

End If

Loop

readfile.close

set readfile=nothing

%>

</body>

</html>
"c" <cl***@force9.co.uk> wrote in message
news:sZ******************@wards.force9.net...
I have the following very simple script which works on my desktop (XP-PRO & IIS5.1) but does not work on my laptop with the same config. It also works
on other configurations without a problem. I have tried re installing IIS
which has not made any difference. The script gets to the line annotated
"'This is where it breaks" and at this line the script simply hangs with no error message at all.

I would guess this is some kind of config problem but I have tried comparing a system that works against this one but haven't been able to find any
differences.

Any help/guidance would be appreciated.

.cw.

Script is as follows:-

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<html>

<head>

<title>Read Text File</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body bgcolor="#CACAFF">

<%

Dim fs,readfile

'Now read back the the data

response.write "reading data from file"

Set fs = CreateObject("Scripting.FileSystemObject")

filename=server.mappath("Information.txt")

response.write "-----" & filename &"-----"

'response.flush

Set readfile=fs.OpenTextFile(filename,ForAppending,Tru e)'this is where it breaks

response.write "FS Open created OK"

Do until readfile.AtEndOfStream

response.write "<br>"

%>

<%

Text=readfile.readline

If Text="" then

response.write "<p>"

Else

response.write Text

End If

Loop

readfile.close

set readfile=nothing

%>

</body>

</html>

Jul 19 '05 #3
http://www.aspfaq.com/2180

"c" <cl***@force9.co.uk> wrote
hangs with no error message
Set readfile=fs.OpenTextFile(filename,ForAppending,Tru e)

Jul 19 '05 #4
c
Thanks Ray, your a Star... I would never have guessed this. I have different
AVP on each system.
Cheers,

...c..

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:ux**************@TK2MSFTNGP12.phx.gbl...
http://www.aspfaq.com/2180

"c" <cl***@force9.co.uk> wrote
hangs with no error message
Set readfile=fs.OpenTextFile(filename,ForAppending,Tru e)


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
55
by: drhowarddrfine | last post by:
I'm working on a web site that could use some control using js but am concerned about what problems I may have with potential users having their js turned off. Has anyone had any serious problems...
2
by: robert.waters | last post by:
Hello, I am dynamically editing the contents of a page and using document.write() to reload the new, edited content. However, on the new page, any calls to functions located in external .js...
2
by: Jeronimo Bertran | last post by:
A couple of questions I am having problems with converting my JavaScript to C#. I have the following code using JavaScript for the mouseover handler that works fine: <SCRIPT...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
10
by: Danny | last post by:
Hi all, I am having some odd problems with AJAX on Firefox (1.5). When I use GET as the request method everything works ok, but when I do a POST the remote function doesn't get the parameters I...
2
by: goodnamesalltaken | last post by:
Hello fellow python users, I've been working on a basic implementation of a privilege separated web server, and I've goto the point of running a basic cgi script. Basically when the execCGI...
3
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page...
10
by: jodleren | last post by:
Hi I know, that there are a lot of people having problems with orkut.com, errors like "object expected" and named objects missing. When loading the site can generate some 10 errors, and still...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.