473,386 Members | 1,694 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,386 software developers and data experts.

ASP Page executed twice

Hi

I have an ASP page which is randomly (?) executed twice. I noticed that the
http header is different, as if there are two different requests sent to the
server. Header 2 below is the one that randomly occur.

Although the 2 headers are different I don't understand why

Help will be greatly appreciated

Thanks

Elie Grouchko
Header 1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */* Accept-Language:
en-nz Connection: Keep-Alive Host: localhost Referer:
http://localhost/mysite/page.asp?sub...=2&forumpage=3 User-Agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cookie: userloginname=; ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK
Content-Length: 230 Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate Cache-Control: no-cache

Header 2

Accept: */* Accept-Language: en-nz Connection: Keep-Alive Host: localhost
Referer: http://localhost/mysite/page.asp?sub...=2&forumpage=4
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322) Cookie: userloginname=;
ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK Accept-Encoding: gzip, deflate
Feb 25 '06 #1
1 1928
Hi again

I resolved this issue, and wanted to share the solution as it may be of some
help to others.

On the specific page I was having a problem I am creating HTML code on the
client side using the JavaScript 'document.write' method. One of the tags I
am creating is an image <img src="" ... />. My plan was to populate the
image at a later point so I left the 'src' property empty, which was a
mistake... The img.src property is required, so the browser assumes that an
empty img.src property means the root URL, and was sending another GET HTTP
request and reloading the entire home-page.

Moral: don't leave the img.src property empty...

:-)

Elie
"Elie Grouchko" <el**@ortel.co.nz> wrote in message
news:Os**************@TK2MSFTNGP14.phx.gbl...
Hi

I have an ASP page which is randomly (?) executed twice. I noticed that
the http header is different, as if there are two different requests sent
to the server. Header 2 below is the one that randomly occur.

Although the 2 headers are different I don't understand why

Help will be greatly appreciated

Thanks

Elie Grouchko
Header 1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */* Accept-Language:
en-nz Connection: Keep-Alive Host: localhost Referer:
http://localhost/mysite/page.asp?sub...=2&forumpage=3 User-Agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Cookie: userloginname=; ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK
Content-Length: 230 Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate Cache-Control: no-cache

Header 2

Accept: */* Accept-Language: en-nz Connection: Keep-Alive Host: localhost
Referer: http://localhost/mysite/page.asp?sub...=2&forumpage=4
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 1.1.4322) Cookie: userloginname=;
ASPSESSIONIDCATRATAC=HGBDLENCAPADIEKHFACKMMFK Accept-Encoding: gzip,
deflate

Feb 26 '06 #2

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

Similar topics

10
by: Manny | last post by:
I have a web form "Page1.asp" and it reads data from a database, does some calculations, and displays the records in pages. Works fine. I have a button that displays on the page, defined as...
1
by: Lewis | last post by:
Hi, Im having a problem with an aspx page that I'm building (and rather urgently needing to complete!). Situation is this... Im transforming some XML using an XSLT which builds an HTML form...
1
by: Jarek | last post by:
Hi! I have a page containing datagrid. When datagrid is edited there is a calendar. When I change the date for the first time all page events are executed twice and: when they are executed for...
7
by: Goober | last post by:
I have a page that receives a session variable from the default.aspx. On Page load, the code in Page load gets executed twice. So far, no problem. It sets the session variable each time,...
5
by: jonhyland | last post by:
Hey all, I'm writing a .NET application where I want all HTTP errors such as 404 to redirect back to the home page. Since .NET only handles HTTP errors if the client is requesting a .NET...
0
by: Alfons Puig | last post by:
Hi, There is a page called GesDoc.aspx that is a container for two frames: Actions.aspx and Word.aspx. On some machines running IE, when loading the container, on some clients Word.aspx code...
8
by: MaryA | last post by:
I have an aspx page that loads twice inspite of using the IsPostBack i removed all controls from the page and still the page_load event is called twice I appriciate any help coz i have lost...
8
by: Marcel | last post by:
I have a problem with a PHP page that seems to get executed twice. I am running PHP5 ISAPI on 2003 server. The script is a PHP page with a form. When the form is submitted one record have to...
3
by: Ed Sonneveld | last post by:
Hi, I have hosted my webservice at a hosting company and it has been working fine for 2 years now. The webservice is called by winforms clients over the internet, using the proxy class generated...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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,...
0
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...

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.