473,756 Members | 2,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=; ASPSESSIONIDCAT RATAC=HGBDLENCA PADIEKHFACKMMFK
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=;
ASPSESSIONIDCAT RATAC=HGBDLENCA PADIEKHFACKMMFK Accept-Encoding: gzip, deflate
Feb 25 '06 #1
1 1952
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******** ******@TK2MSFTN GP14.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=; ASPSESSIONIDCAT RATAC=HGBDLENCA PADIEKHFACKMMFK
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=;
ASPSESSIONIDCAT RATAC=HGBDLENCA PADIEKHFACKMMFK 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
3179
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 <input type="button" onClick="OutputData()"> The OutputData() function is a javascript function that simply does this: window.location = "Page1.asp?Flag=1";
1
5826
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 using an aspx (C# - using VS.NET). Within the resulting HTML is a form, which contains the following : <form method="POST" action="recieveForm.aspx?lang=eng">
1
1798
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 the first time they are executed in response to post back as it should be, but for the second time the page is reloaded again just like it would be called for the first time. Please Help Me!
7
3946
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, correctly. However, when I click on a menu item in that page, it then executes the same page load twice, before transferring control (via a response.redirect) to the new page. On the first pass through the page load of the menu page, the session...
5
3449
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 resource (.ASPX, whatever), I need to go into IIS -> Custom Errors tab and set my homepage under each HTTP error I want to handle. This allows my page to be shown if someone requests an .ASP or .HTM page that doesn't exist.
0
1016
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 behind is executed twice, producing a bad result. On the requests from clients that fail, I noticed: * Enabling trace on web.config file and looking at the trace.axd, on the second call the ASP.NET_SessionID is different. * Looking at the IIS logs...
8
3360
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 several hours on this NB even i removed all events called on page load but still same problem Regards
8
4040
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 be inserted in the database but when i look at the database after submitting the form there are two(!) records inserted so it looks like the script is executed twice. Can this be a proxy-setting or an ISA`server related subject???
3
5719
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 by visual studio. What I do not understand, however, is that sometimes (say 1% of all calls) are being executed twice on the server side. I notice that because each call makes an entry in the database. This problem has been around as long as...
0
9456
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
9275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10040
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
9873
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
9846
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
8713
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
7248
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...
1
3806
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
2
3359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.