ASP.NET ajax extensions and ASP.NET Futures, strange error

Discussion in 'ASP.NET / ASP.NET Core' started by agriffit, Dec 19, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I've a site which uses asp.net futures and ajax extensions.

    It works fine on my loacal pc and used to work on the discountasp servers, but for some reason it's stopped working. The error message is shown at the end of this post.
    I've tried downloading all the code to my local incase it's something I changed on the serverside and not locally, but once downloaded it runs as I'd expect with no errors?!


    The strange thing is the error itself, as the scriptManager and the history control are diclared next to each other in a master page used through out the site.
    Without remote debugging I'm lost. [​IMG]

    If anyone knows or has any ideas on this (or can help me set up remote debugging) it'd be much appreciated. [​IMG]
    Anthony



    Server Error in '/PortfolioSlides' Application.


    You must have a ScriptManager on the page to use a History control Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: You must have a ScriptManager on the page to use a History control

    Source Error:





    Code:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:





    Code:
    [InvalidOperationException: You must have a ScriptManager on the page to use a History control]
       Microsoft.Web.Preview.UI.Controls.History.OnPreRender(EventArgs e) +832
       System.Web.UI.Control.PreRenderRecursiveInternal() +86
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
    
     
  2. My guess is, by the things you've mentioned, this does have to do with the master page.
    As noted in the error the script manager can't be found.
    Browse the Ajax forum section of the http://asp.net site, there have been some posts similar to this lately.
    Salute,
    Mark
     
  3. That is correct, yes, but the part that is failing is because the root application isn't used.
    Create an application (DASP CP) for the app folder then alter any code that fails.
     
  4. I'll test any of your code you want on my DASP server if you want.
    Always willing to help people here. [​IMG]
    http://sdknuts.net/fileup/

    (SDK Nuts is an international community of 3D game developers.)
    Salute,
    Mark
     
  5. I see. so it's looking in the site root, not the virtual/web application root. I'll try changingthe ~/App/ to ./


    ......[​IMG] Same error.


    Sorry if I'm being a bit slow but what's CP in (DASP CP)?
     
  6. CP = Control Panel

    In your DASP account Control Panel you can create an application for folders.
    Your root folder is an application by default.

    Don't fret bro, I don't mind helping at all.
    Salute,
    Mark

    PS - My kids are on Christmas break so I may not respond right away...going nuts. [​IMG]
     
  7. Thx, I just uploaded the code, it's called portfolio.rar. [​IMG]
     
  8. Got it.
    One thing I spotted right away is the app folder.

    I see what may be going on between the local site and remote.
    Your "root" app code isn't in the site root.

    Your web.config is in the site root.
    The master page is below the root in your app folder.

    When you use master pages like that they will look for the site root "~".
    You can do this the way you have it with a few changes but I'm wondering...

    Can these folders and files be reorganized so the default files and master pages are in the root with the web.config?

    If you want I'll help you with that.

    The other way to do this will be to create an application for the app folder and change your code so the master page can be found.
    Salute,
    Mark
     
  9. Not sure I understand. The webconfig file, App_Code, App_Data and bin folders are all in the root of the web application and the reference to the master page is


    MasterPageFile="~/App/MasterPage.master"


    So although the masterpage is below root in the App folder, so is the reference. Right?[​IMG]
     
  10. Thanks Mark, I've had a good look and all though there were many titles that made me hopeful they were sadly not relevant.

    Thing that gets me is it works fine on my local pc using VS 2008 ASP.NET Development Server.
    I've just tried installing the iis that ships with xp pro (iis 5I think) to see if I can replicate the problem that way, but it works fine on that too.[​IMG]

    I only get the problem when I upload to the discountasp server and I don't know how to debug it there.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page