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

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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 [url]http://localhost/MainProject/[/url] or
    [url]http://localhost/MainProject/default.aspx[/url], 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?
    Cynic07 Guest

  2. Similar Questions and Discussions

    1. dupe times in Time::HiRes
      Monks, mongers and perlites, I have been attempting to use it to provide 20 digit time date stamp which includes 6 digits for microseconds. In...
    2. Is Time Between 2 other times
      There is an obvious solution to this but I can't figure it out: I need to know whether the current time is between midnight and 8am. Thanks
    3. Action Requested - 2003 and browser crashes
      In researching a potential issue in version 2003 I'm requesting some assistance from forum participants. Please visit each of these two sites: ...
    4. Page Load fired 3 times Web user control is embedded in a custom control
      Hi, I have built a custom control that build a table with 3 cells in it. The custom control is designed to add all child controls to cell#2,...
    5. server time vs browser time on cookie expirations
      Say, I want to set a cookie and have it expire an hour after it's set. It's looking like this is only possible for browsers which are in the same...
  3. #2

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

    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
    Cynic07 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139