Rendered HTML code from different aspx pages being executed - A bug?

Last post 07-01-2008 3:57 AM by priccopricco. 9 replies.

Sort Posts:

  • Rendered HTML code from different aspx pages being executed - A bug?

    09-19-2007, 5:04 AM
    • Member
      83 point Member
    • priccopricco
    • Member since 07-23-2003, 1:10 AM
    • Posts 49

     Hi everyone,

        I've a very very strange behaviour on my asp.net application.

    Sometimes happens that when you load a page, there is a piece of code of another web page page being viewed contemporaneously by another visitor! It's really strange...

    So if we have two pages, for example page1.aspx and page2.aspx, and we have two concurrent visitors, user1 and user2, user1 loading page1.aspx and user2 loading page2.aspx, sometimes what is actually rendered to client is:

    for user1:
    a first portion of rendered HTML from page1.aspx
    a random piece of HTML page2.aspx being delivered to user2
    the last portion of rendered HTML of page1.aspx.

    I really do not know what's happening...

    I'm using ASP.NET 2.0 and IIS 6.0 on a Win2003 server.

    I thought that this behaviour was due to enableKernelOutputCache BUG (http://support.microsoft.com/kb/917072) but in my webconfig the enableKernelOutputCache is set to false, we've never had a "Cross Session" issue and our problem seems really different.
    With that bug the ENTIRE "wrong" web page is delivered to client, not a mix of two pages...

    If you have any idea or suggestion, please tell me, I don't know where to start from...
    Any help will be really appreciated.

    Thanks in advance...
     

    Filed under:
  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    09-20-2007, 1:16 AM
    • Member
      192 point Member
    • leelu
    • Member since 08-25-2005, 3:14 PM
    • Posts 36

    Hi,

    Can you remove the outputcache for both of the page's if enabled
    and try to reproduce the same now.

    Here is a good explaination on this issue.
    (Sessions and Output Caching)
    -----------------------------
    http://msdn.microsoft.com/msdnmag/issues/06/07/WebAppFollies

    Sorry, if you already know about it.

    Thanks,
    Manas

  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    09-20-2007, 2:32 AM
    • Member
      83 point Member
    • priccopricco
    • Member since 07-23-2003, 1:10 AM
    • Posts 49

    Hi Manas,
    thanks for your interest!

    Alas it seems not that problem... I have no page with OutputCache (I've only some ascx control OutputCached), and the Session Cookie seems to be correctly sent to browsers..
    Moreover I've set  in my web.config

    <httpRuntime enableKernelOutputCache="false" />
    My problem is that the code of two pages are mixed, I had never heard about it before....

    It seems impossible to me that this could happen! :( 

    Thanks anyway...
     

  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    09-20-2007, 3:28 AM
    • Member
      192 point Member
    • leelu
    • Member since 08-25-2005, 3:14 PM
    • Posts 36

    Hi,

    Is the outputcache for the user control is set to varybyparam and the control is loaded dynamically?
    Then also there are some problems relating this.

    Please check the outputcache for the user control once.

    reply please.

    Thanks,
    Manas

  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    09-20-2007, 4:11 AM
    • Member
      83 point Member
    • priccopricco
    • Member since 07-23-2003, 1:10 AM
    • Posts 49

     The OutputCache is not loaded dynamically, it's in the ascx file:
     

    <%@ OutputCache Duration="3600" Shared="true" VaryByParam="none" %>
    Thanks for support...
  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    09-20-2007, 5:21 AM
    • Member
      192 point Member
    • leelu
    • Member since 08-25-2005, 3:14 PM
    • Posts 36

    Hi,

    Thanks for the provided information.

    Is this control part that was appearing/rendering from a different user?
    Can you please try by removing this outputcache directive for the user control as you mentioned above.

    I think it should work fine with out the outputcache directives.

    Looking forward...

    Thanks,
    Manas

  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    09-20-2007, 5:57 AM
    • Member
      83 point Member
    • priccopricco
    • Member since 07-23-2003, 1:10 AM
    • Posts 49

    Unfortunately there's not a specific page involved in this issue... All the pages are randomly affected...

    I indicated in the first post 2 "example pages" to better explain what the problem was... 

    Sometimes happen that also the .axd files are "injected" into the rendered HTML page; I use ASP.NET Ajax & ASP.NET Ajax Toolkit and sometime you can read directly in the HTML a long piece of Jscript code...

    Here an example of "injected" Jscript code from an axd file (the code below is the actually rendered HTML to browser)

     

    [...]

    <a href="http://www.mysite.com/Test/" style="font-size: 18px;">Test</a>
    }
    return WebForm_GetElementDir(element.parentNode);
    }
    return "ltr";
    }
    function WebForm_GetElementPosition(element) {
    var result = new Object();
    result.x = 0;
    result.y = 0;
    result.width = 0;
    result.height = 0;
    if (element.offsetParent) {
    result.x = element.offsetLeft;
    result.y = element.offsetTop;
    var parent = element.offsetParent;
    while (parent) {
    result.x += parent.offsetLeft;
    result.y += parent.offsetTop;
    var parentTagName = parent.tagName.toLowerCase();
    if (parentTagName != "table" &&
    parentTagName != "body" &&
    parentTagName != "html" &&
    parentTagName != "div" &&
    parent.clientTop &&
    parent.clientLeft) {
    result.x += parent.clientLeft;
    result.y += parent.clientTop;
    }
    parent = parent.offsetParent;
    }
    }
    else if (element.left && element.top) {
    result.x = element.left;
    result.y = element.top;
    }
    else {
    if (element.x) {
    result.x = element.x;
    }
    if (element.y) {
    result.y = element.y;
    }
    }
    if (element.offsetWidth && element.offsetHeight) {
    result.width = element.offsetWidth;
    result.height = element.offsetHeight;
    }
    else if (element.style && element.style.pixelWidth && element.style.pixelHeight) {
    result.width = element.style.pixelWidth;
    result.height = element.style.pixelHeight;
    }
    return result;
    }
    function WebForm_GetParentByTagName(element, tagName) {
    var parent = element.parentNode;
    var upperTagName = tagName.toUpperCase();
    while (parent && (parent.tagName.toUpperCase() != upperTagName)) {
    parent = parent.parentNode ? parent.parentNode : parent.parentElement;
    }
    return parent;
    }
    function WebForm_SetElementHeight(element, height) {
    if (element && element.style) {
    element.style.height = height + "px";
    }
    }
    function WebForm_SetElementWidth(element, width) {
    if (element && element.style) {
    element.style.width = width + "px";
    }
    }
    function WebForm_SetElementX(element, x) {
    if (element && element.style) {
    element.style.left = x + "px";
    }
    }
    function WebForm_SetElementY(element, y) {
    if (element && element.style) {
    element.style.top = y + "px";
    }
    }
    a" href="http://www.mysite.com" style="font-size:18px;">Hello
    </span>

    [...]
      

    As you can see there's a first piece of the right page, then randomly a pice of the axd file (I think it's from ASP.NET Ajax Toolkit) and the the last piece of the right page being executed...

    Thanks...

     

  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    06-05-2008, 6:38 AM
    • Member
      83 point Member
    • priccopricco
    • Member since 07-23-2003, 1:10 AM
    • Posts 49

    Seems we've solved the problem!
    I'll report you the cause of it in case someone else should experience the same issue.

    The problem was in a release of an HTTPModule, NeatUpload.

    The version of the module that caused the problem is
    http://www.brettle.com/Data/Sites/1/NeatUpload-trunk.439.zip
    Upgrading to this version
    http://www.brettle.com/Data/Sites/1/NeatUpload-1.2.28.zip
    the problem seems to not appear anymore.

    Thanks everyone for help! 

  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    07-01-2008, 3:28 AM
    • Member
      4 point Member
    • doronsd
    • Member since 07-01-2008, 7:25 AM
    • Posts 2

    priccopricco thank you ! thank you ! thank you ! thank you !
    I'm having this bug for 6 month and hav'nt figure it out.

    Thanks again !

  • Re: Rendered HTML code from different aspx pages being executed - A bug?

    07-01-2008, 3:57 AM
    • Member
      83 point Member
    • priccopricco
    • Member since 07-23-2003, 1:10 AM
    • Posts 49

    Hi doronsd!

    I can really understand you, trust me!!! Really happy this helped you...
    We get mad about this issue, really hard to find out what the problem was...

    But just for curiosity, which release of NeatUpload did you have problem with?

    Thanks!!!
     

     

Page 1 of 1 (10 items)