473,856 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="VB SCRIPT" CODEPAGE="1252" %>

<html>

<head>

<title>Read Text File</title>

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

</head>

<body bgcolor="#CACAF F">

<%

Dim fs,readfile

'Now read back the the data

response.write "reading data from file"

Set fs = CreateObject("S cripting.FileSy stemObject")

filename=server .mappath("Infor mation.txt")

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

'response.flush

Set readfile=fs.Ope nTextFile(filen ame,ForAppendin g,True)'this is
where it breaks

response.write "FS Open created OK"

Do until readfile.AtEndO fStream

response.write "<br>"

%>

<%

Text=readfile.r eadline

If Text="" then

response.write "<p>"

Else

response.write Text

End If

Loop

readfile.close

set readfile=nothin g

%>

</body>

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

"c" <cl***@force9.c o.uk> wrote
hangs with no error message
Set readfile=fs.Ope nTextFile(filen ame,ForAppendin g,True)

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="#CACAF F">

<%

Dim fs,readfile

'Now read back the the data

response.write "reading data from file"

Set fs = CreateObject("S cripting.FileSy stemObject")

filename=server .mappath("Infor mation.txt")

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

'response.flush

Set readfile=fs.Ope nTextFile(filen ame,1,True)'thi s is where it
breaks

response.write "FS Open created OK"

Do until readfile.AtEndO fStream

response.write "<br>"

%>

<%

Text=readfile.r eadline

If Text="" then

response.write "<p>"

Else

response.write Text

End If

Loop

readfile.close

set readfile=nothin g

%>

</body>

</html>
"c" <cl***@force9.c o.uk> wrote in message
news:sZ******** **********@ward s.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="VB SCRIPT" CODEPAGE="1252" %>

<html>

<head>

<title>Read Text File</title>

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

</head>

<body bgcolor="#CACAF F">

<%

Dim fs,readfile

'Now read back the the data

response.write "reading data from file"

Set fs = CreateObject("S cripting.FileSy stemObject")

filename=server .mappath("Infor mation.txt")

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

'response.flush

Set readfile=fs.Ope nTextFile(filen ame,ForAppendin g,True)'this is where it breaks

response.write "FS Open created OK"

Do until readfile.AtEndO fStream

response.write "<br>"

%>

<%

Text=readfile.r eadline

If Text="" then

response.write "<p>"

Else

response.write Text

End If

Loop

readfile.close

set readfile=nothin g

%>

</body>

</html>

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

"c" <cl***@force9.c o.uk> wrote
hangs with no error message
Set readfile=fs.Ope nTextFile(filen ame,ForAppendin g,True)

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******** ******@TK2MSFTN GP12.phx.gbl...
http://www.aspfaq.com/2180

"c" <cl***@force9.c o.uk> wrote
hangs with no error message
Set readfile=fs.Ope nTextFile(filen ame,ForAppendin g,True)


Jul 19 '05 #5

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

Similar topics

13
40789
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 style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
1
3056
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
4237
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 with this sort of thing? I know some of these potential users are with big companies and am wondering if anyone had real problems with that.
2
3627
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 files (fyi: same domain) fail with 'object expected' (IE6). If I subsequently reload the page, everything works. Also, if I inline this code, everything works. Here is an example: (called from body onload event) (This just rewrites the page with...
2
4067
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 language=JavaScript> function MyMouseOver() {
0
3233
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 converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
10
19183
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 am passing to it. Everything works fine on IE 6. Here's a couple samples of what I am doing: // using GET url = 'http://www.myserver.com/cgi-bin/funct?key1=value1&key2=value2'
2
5397
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 function in my Unpriv.py program is called a few things should happen, it should fork (which it does), the stdout of the child should be redirected to a given pipe (which it does), and the script should execute using execve(which is has problems...
3
4500
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 includes background music with a javascript music player on the main page below an iframe that is used for all content and navigation of the site and so that the music doesn't reload each time a page is switched. There is another javascript to resize...
10
1869
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 just leave a blue page - seems like it heavily rely on JS. Still, me and friends having problems and orkut seems just to ignore it. I am sure, that other poeple have problems, and I really wonder what
0
9916
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11056
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10696
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10782
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9531
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7932
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5761
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4575
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3201
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.