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

Application_BeginRequest is fired 2 times each time I do an action on the browser...

Hi, I hope someone could help me with this problem...

First, the context :
IIS : v5.1
Framework : v1.1
Language : C#
I have a main page (default.aspx) which is my server default page.
That I open http://localhost/MainProject/ or
http://localhost/MainProject/default.aspx, I have the
Application_BeginRequest fired 2 times... so the Default.Page_Load()
method occures 2 times too.

When I click any link button in my page, the Click event only occurs
the first time.

When I noticed this problem, I made a test.aspx so see if this page
does the same thing and NO. This one is only fireing
Application_BeginRequest one time.

Here are tests I tried :

- First I wrote a method : WriteDebug(string event) that writes "time
+ event + context id" to a file
I call this method on overridden OnInit() and CreateChildControl()
methods, on Page_Load() and Pre_Render() methods that are registered
to Load and PreRender System.Web.UI.Page EventHandlers.

- Second I change the default.aspx to test2.aspx and the problem is
still there.
Does anyone have encountered that problem before?
Anybody have a suggestion for me?
Nov 17 '05 #1
1 4655
Hello Everyone, I found my problem and I can tell you that is a BUG in
ASP.NET.

I Explain:

I had a page that was fireing 2 requests each time I asked for an
action from the browser (Click a linkbutton, ... or even call it for
the first time..)

The problem was that in my <Body> tag.
Here are two possible ways to change the color or background image of
a page :
<body bgColor="#rrggbb"> (red-green-blue)
or
<body background="image.gif">

My error (which is not supposed to fire two requests) was that I had a
body tag like : <body background="#cccccc">
Probably a BUG from ASP.NET that was validating the file #cccccc as a
background! and I don't know why, but was fireing a second request
from the server...
Hope this bug could help some of you...


Nicolas Dion
Nov 17 '05 #2

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

Similar topics

7
by: Ankit Aneja | last post by:
I put the code for url rewrite in my Application_BeginRequest on global.ascx some .aspx pages are in root ,some in folder named admin and some in folder named user aspx pages which are in user...
6
by: RobR | last post by:
We have a customer using our application that has a problem. Within our app, we have a two different forms (one generates an email, the other a fax via a webservice). When they click the submit...
0
by: Rahul | last post by:
I am using Application_BeginRequest function in my Global.ascx file and I have a breakpoint set over there. I have a master page and and one of the content of the master page pints to...
0
by: Rahul | last post by:
Earlier this evening i posted a question that my debug point is hit several times, But after I published the application. I could significantly see less round trip per request for Application_Begin...
19
by: Mark Rae | last post by:
Hi, Is it possible to have programmatic access to the Page object in Application_BeginRequest, or is it too early in the lifecycle...? E.g. to be able to change a page's MasterPage...
4
by: since | last post by:
How do I in IE prevent the onclick action from being fired when I am done dragging? have tried "window.event.cancelBubble = true", for onmouseup , onmousedown, and onmousemove handlers. The onclick...
3
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I've used an Application_BeginRequest function in my global.asax page to implement some URL rewriting functionality on our website. However, upon moving it to my host (1&1.co.uk), it...
0
by: radiv | last post by:
My code is in ASP.Net. I have loaded a web page into a web browser and have identified the elements on the web page (buttons) using Ihtmldocument and have my code written to the events. ...
1
by: =?Utf-8?B?R3JlZw==?= | last post by:
I've been playing around with the Global.asax file and learning how it can help me with my web application. I created an Application_EndRequest() method with a Response.Write("Output"); line of...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.