asp.net ajax problem

Last post 06-25-2008 8:58 AM by Sonu. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 06-24-2008 9:02 AM

    asp.net ajax problem

    I have a website using Asp.Net 2.0 that is Ajax enabled and am experiencing a problem that I have been unable to resolve.

    Everything works fine until the session times out.

    Then, when this has timed out, I get this error in a Windows Internet Explorer message box: -

    Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

    Details: Error parsing near ‘<script type=’text/j’.

    Then the site will just not function, even if refreshed.  I have to start a new Internet Explorer for it to work again.

    Firstly, does anyone know what is likely to be or could be causing this error?

    There is also an anomoly, though.

    The site is hosted on a shared server.  If I change the timeout for session via web.config, say to 1 or 2 minutes, then when the session expires and the site behaves as I would expect (as per the code).

    However, if left for more than 20 minutes, then the problem is there again, even though the session is set to 1 or 2 minutes.

    Is there a step here or something I am missing?  Is there another timeout I need to deal with?

    Any help on this appreciated.

    Thanks,

    Darren

     

    dbrook007
  •  Advertisement

    Featured Advertisement

     
  • 06-24-2008 10:17 AM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 12,183
    • MVP

    Re: asp.net ajax problem

     Take a look at this post.

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
  • 06-24-2008 11:43 AM In reply to

    Re: asp.net ajax problem

    Thanks.

    I've looked at this but it hasn't really got me any closer.

    There's no calls to Response.Write().

    I cannot see anywhere in the project using response filters.

    The only reference to HttpModules I can find is this in web.config:

    <httpModules>
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
            </httpModules>

    Server trace is not enabled.

    There are no calls to Server.Transfer() in the project.

    I don't really know where to start with this.

    !!!!aaggghhhh

    Regards,

    Darren

     

     

     

    dbrook007
  • 06-24-2008 11:52 AM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 12,183
    • MVP

    Re: asp.net ajax problem

    Can you post your code? And you are 100% sure that there is no Response.Write anywhere in your code - Can you do a CTRL+F for it?

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
  • 06-24-2008 12:06 PM In reply to

    Re: asp.net ajax problem

    There's definitely no Response.Write anywhere in the code.  Double-checked.

    I can't post the code unfortunately.

    There are two Ajax UpdatePanels being used.  The project also uses masterpages.

    It only occurs after the Session has expired!?

    Regards - Darren

     

    dbrook007
  • 06-24-2008 12:18 PM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 12,183
    • MVP

    Re: asp.net ajax problem

    Can you post the aspx at least? Do you have any ajax exception handler that would get fired if the session expires? Its hard to help without having the code.

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
  • 06-24-2008 12:34 PM In reply to

    Re: asp.net ajax problem

    I'm happy to e-mail the code but I would not be comfortable with posting the code in the public domain.

    Ajax exception handler. ? What would you recommend with regards to an ajax exception handler?

    Thanks - Darren

     

     

    dbrook007
  • 06-24-2008 12:43 PM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 12,183
    • MVP

    Re: asp.net ajax problem

    Sure - email it. If possible can you send a complete small website project that reproduces the error?

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
  • 06-24-2008 1:02 PM In reply to

    Re: asp.net ajax problem

    Ok - I've emailed it over.

    Thanks - Darren

     

    dbrook007
  • 06-24-2008 9:27 PM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 12,183
    • MVP

    Re: asp.net ajax problem

    Hello Darren,

    I have tested your code and I am not able to reproduce the error, even when the timeout expires. Does the error happen randomly?

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
  • 06-25-2008 5:32 AM In reply to

    Re: asp.net ajax problem

    That is frustrating.

    It does happen every time for me.  And on more than one machine (I was getting concerned I had a problem with one PC).  I get the problem in any browser too (IE7, FireFox, Avant)

    I've attached a Word file in an e-mail containing the second error I get.  Wondered if that might shed any light on it?

    Thanks - Darren

     

     

     

    dbrook007
  • 06-25-2008 8:03 AM In reply to

    Re: asp.net ajax problem

    You should be able to see the problem on the live version (www.estateside.co.uk).

    If you go to the search page, select "Buy" from the Buy/Let drop down and then click Submit.

    Then, leave that browser open for a few hours and come back to it.

    When you come back to it, change one of the drop-downs and click "Submit" (I usually just change "Buy" to "Rent" in the buy/let drop down).

    You should then see the error appear in an Internet Explorer message box (the message box is not generated by any of my code).

    This problem is now hurting.

    Thanks - Darren

     

     

    dbrook007
  • 06-25-2008 8:58 AM In reply to

    • Sonu
    • Top 10 Contributor
    • Joined on 05-22-2006
    • Montreal / Canada
    • Slacker
    • Points 12,183
    • MVP

    Re: asp.net ajax problem

    Ok, I will check that website. Are you able to re-create the error locally as well?

    [MVP since 2005] [MCAD]
    Webmaster of DotNetSlackers
    Question or Suggestion?
    Feel free to ask my any .NET question
    Our Posting FAQ
Page 1 of 1 (13 items)