Internet Explorer creates temp file from an asp page.

J

James_101

My training piece is in Authorware. The user logs in with last name and a
four-digit number. Authorware sends this user identifier to an asp page
called db_read.asp. This file sends a SQL SELECT command to a Microsoft
Access database. The database returns either the record that was selected or
a "no record" message. The db_read.asp file relays this information to
Authorware. If a record was returned, Authorware displays it. If there is
no record, Authorware displays the message "You have logged in for the first
time".

Later when the user exits Authorware , the Authorware file takes one of two
actions. If a record was returned from the database following log-in, then
Authorware runs an asp file called db_update.asp to update the record in
Access. If no record was return, Authorware runs an asp file called
db_add.asp to add a new record to the database.

All of this runs fine on my computer which has IE 6.0, Win XP and IIS. My
customer has IE 6.0, Win 2000 and IIS and the customer has an issue. The 1st
login goes correctly. Authorware displays the messge "You have logged in for
the first time" and upon exit, a new record is added to the database. During
this login, however, an internet temporary file is created for the file
db_read.asp. When the customer logs in for the second time with the same
last name and four-digit number, the screen again displays "You have logged
in for the first time" (the screen should have displayed the record). After
exit, the database has added a second, identical record (the database should
have updated the first record, not add a second one).

After the 1st login, if the customer deletes the temporary file, the 2nd
login runs correctly.

IE does not create temporary files for the other two asp files.

Any suggestions on how I can resolve this issue?

Thanks.

Jim Bowman
 
E

Evertjan.

=?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
microsoft.public.inetserver.asp.general:
All of this runs fine on my computer which has IE 6.0, Win XP and IIS.
My customer has IE 6.0, Win 2000 and IIS and the customer has an
issue. The 1st login goes correctly. Authorware displays the messge
"You have logged in for the first time" and upon exit, a new record is
added to the database. During this login, however, an internet
temporary file is created for the file db_read.asp. When the customer
logs in for the second time with the same ....

Well, not exactly.

The html rendering of the asp output is cached on the client,
not the asp file itself.

Use:

<% Response.Expires = 0 %>

and try again.
 
J

James_101

Thank you Evertjan. In researching this code, sometimes I see it as
Response.Expires and at other times it's Response.expires. Is uppercase vs
lowercase not important?

The html rendering of the output for the file db_read.asp is cached but the
output for the files db_add.asp and db_update.asp is not cached. Any
thoughts on why the output for one file is cached and not the other two?

Thank you.

Jim
 
E

Evertjan.

=?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
microsoft.public.inetserver.asp.general:
[please do not toppost on usenet]
Thank you Evertjan. In researching this code, sometimes I see it as
Response.Expires and at other times it's Response.expires. Is
uppercase vs lowercase not important?

No it is not. ASP server directives and VBS are not case sensitive.

However Jscript is!
The html rendering of the output for the file db_read.asp is cached
but the output for the files db_add.asp and db_update.asp is not
cached. Any thoughts on why the output for one file is cached and not
the other two?

Did you add

<% Response.Expires = 0 %>

as the first line of all these 3 asp pagefiles???
 
J

James_101

I have not yet added Response.Expires=0 to any asp page.

There are two computer systems. On mine (WinXP, IE 6.0), no temporary files
are created for the output of any of the 3 asp files.

On my customer's system (Win2000, IE 6.0), a temp file is created for the
output of db_read.asp but not for db_add.asp or db_update.asp. I will have
the customer add the needed code on Monday, Apr 11.

The db_read.asp file contains the code Response.write (var name). The files
db_add.asp and db_update.asp do not contain Response.write. They form an SQL
INSERT or UPDATE statement, create a connection to a database, use the
execute method to send the SQL query, and then close the database connection.
Does this explain the fact that the customer's computer system saves the
output of db_read.asp as a temp file and not db_add.asp or db_update.asp?

Should Response.expires=0 be placed at the beginning of the asp page or is
the location not important?

Thanks.

Jim

Evertjan. said:
=?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
microsoft.public.inetserver.asp.general:
[please do not toppost on usenet]
Thank you Evertjan. In researching this code, sometimes I see it as
Response.Expires and at other times it's Response.expires. Is
uppercase vs lowercase not important?

No it is not. ASP server directives and VBS are not case sensitive.

However Jscript is!
The html rendering of the output for the file db_read.asp is cached
but the output for the files db_add.asp and db_update.asp is not
cached. Any thoughts on why the output for one file is cached and not
the other two?

Did you add

<% Response.Expires = 0 %>

as the first line of all these 3 asp pagefiles???
 
J

James_101

Sorry, I was not familiar with topposting.

You asked: Did you add
<% Response.Expires = 0 %>
as the first line of all these 3 asp pagefiles???

I have not yet added Response.Expires=0 to any asp page.

There are two computer systems. On mine (WinXP, IE 6.0), no temporary files
are created for the output of any of the 3 asp files.

On my customer's system (Win2000, IE 6.0), a temp file is created for the
output of db_read.asp but not for db_add.asp or db_update.asp. I will have
the customer add the needed code on Monday, Apr 11.

The db_read.asp file contains the code Response.write (var name). The files
db_add.asp and db_update.asp do not contain Response.write. They form an SQL
INSERT or UPDATE statement, create a connection to a database, use the
execute method to send the SQL query, and then close the database connection.
Does this explain the fact that the customer's computer system saves the
output of db_read.asp as a temp file and not db_add.asp or db_update.asp?

Should Response.expires=0 be placed at the beginning of the asp page or is
the location not important?

Jim
 
E

Evertjan.

=?Utf-8?B?SmFtZXNfMTAx?= wrote on 09 apr 2005 in
microsoft.public.inetserver.asp.general:
Sorry, I was not familiar with topposting.

You asked: Did you add
<% Response.Expires = 0 %>
as the first line of all these 3 asp pagefiles???

I have not yet added Response.Expires=0 to any asp page.

Please do!
There are two computer systems. On mine (WinXP, IE 6.0), no temporary
files are created for the output of any of the 3 asp files.

No, no, teporary files are something else as cache files.

The ASP-file is and remains on the server, and is the source for a html
file that is sent to the client [with an asp extension]

cashe files have nothing to do with asp, but are always generated by IE
on the client. ONLY the [view-source invisible] header of the sent [html-
like] file contains a expiration directive, that can be set with thwe
above asp command said:
On my customer's system (Win2000, IE 6.0), a temp file is created for
the output of db_read.asp but not for db_add.asp or db_update.asp. I
will have the customer add the needed code on Monday, Apr 11.
OK.

The db_read.asp file contains the code Response.write (var name). The
files db_add.asp and db_update.asp do not contain Response.write.

No matter:

<% Response.write "<br>Hello World<br>" %>

and

<% = "<br>Hello World<br>" %>

and

<%
t = "<br>Hello World<br>"
Response.write t
%>

and

<br>Hello World<br>

render the same html code.
They form an SQL INSERT or UPDATE statement, create a connection to a
database, use the execute method to send the SQL query, and then close
the database connection.
Does this explain the fact that the customer's computer system saves
the
output of db_read.asp as a temp file and not db_add.asp or
db_update.asp?

No, because only html code [and possibly clientside scripting, if you
entered that,] reaches the client. The client [read clientside browser]
does not know and does not care if the html originated from serversided
database interrogation. If you doubt that, do extensive clientside view-
sourcing on your files.
Should Response.expires=0 be placed at the beginning of the asp page
or is the location not important?

It is customary and probably necessary to put it at the beginning, at
least before the code that renders html output.

===========

[The above way of answering is called interquoting and is the preferred
way of the one to many communication used on usenet the last 30 years]
 
J

James_101

Let's see if I understand what you have taught me.

When the client runs my authoring program and the program calls any of the
asp pages (db_read.asp, db_add.asp or db_update.asp), Microsoft IIS reads
and executes the commands in the asp page. Then IIS sends the resulting html
page to the client browser which saves certain data in a cache. If the
authoring program again calls the same asp page, the client browser may
ignore the resulting html page and instead use the data cached earlier.

To prevent this inaccuracy, I place Response.expires=-1 as the first command
in my asp page so it reads:

<%@ language=VBScript%>
<% Option Explicit %>
<%

Response.expires = -1

(then all current code)

I am using -1 because one article indicated that time zone differences
between the server and client would affect Response.expires=0.
Response.expires=-1 always causes the cached data to expire immediately.

Is all of this correct?

Jim
 
E

Evertjan.

Jim wrote on 10 apr 2005 in
microsoft.public.inetserver.asp.general:
Let's see if I understand what you have taught me.

"you"?

Who are you talking to, Jim?

You are posting to thousands of readers all over the world now via usenet
and many more in the years to come via the usenet archive.

So please quote part of the post you are reacting on, starting the quote
with particulars of the sender. see above.

This is not email. This is not the web. This is usenet.
When the client runs my authoring program

What authoring program?
On the client's machine?
Doesn't the client simply run a browser, i.c. IE?
and the program calls any of

I expect you simply mean a clientside browser.
the asp pages (db_read.asp, db_add.asp or db_update.asp), Microsoft
IIS reads and executes the commands in the asp page. Then IIS sends
the resulting html page to the client browser

Yes, a html page with a .asp extension, but not the asp source file.
which saves certain data in a cache.

No, not certain data but that whole html page, including expiry date and
some other things, [all depending on the "correctnes" browser, but let us
presume said IE]
If the authoring program again calls the same asp page,
the client browser may ignore the resulting html page and instead use
the data cached earlier.

Yes if the page is not expired and the cache is not disabled or
overfilled and ...
To prevent this inaccuracy,

It is not an inaccuracy, but a very usefull idea for the web, preventing
lots of unnecessary trafic and waiting time. In your special case, for
some special pages, you don't want this behavour.
I place Response.expires=-1 as the first
command in my asp page so it reads:

<%@ language=VBScript%>
<% Option Explicit %>
<%

Response.expires = -1

<%@ language=VBScript%>
<%
Response.expires = 0
Option Explicit
(then all current code)

I am using -1 because one article indicated that time zone differences
between the server and client would affect Response.expires=0.
Response.expires=-1 always causes the cached data to expire
immediately.

No, I think all these are stored as UTC and anyway that one minute won't
cover even one hour of timezone difference, let alone 23 hours.

It will perhaps cover clientside clock innaccuracies, but one can see
clients with a local clock set to a year 2012 date. So why one minute, if
the effects exists at all, which I am not sure about?
Is all of this correct?

Make your own conclusions. ;-}
 

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,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top