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

C

Cynic07

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?
 
C

Cynic07

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
 

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,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top