Ajax 1.0 Problem: Unknown server tag 'cc1:SlideShowExtender'

Discussion in 'ASP.NET 2.0' started by Chicago_Lar, Sep 14, 2007.

  1. I?m running into a problem with the <st1:place w:st="on"><st1:City w:st="on">Ajax toolkit. First, my configuration:
    </o:p>
    I?m using Visual Web Developer Express 2005.
    </o:p>
    I have the AjaxControlToolkit.dll for <st1:place w:st="on"><st1:City w:st="on">Ajax 1.0, ASP 2.0 installed in my bin directory, via Website/Add Reference?/Browse from the toolbar.
    </o:p>
    I?m trying to use the Ajax SlideShowExtender to run a simple slide show.
    </o:p>
    Everything runs fine in VWDE on my PC, but when I copied all the files to my website and tried to opened the page ( http://www.StarEmperors.com/AudreySlides.aspx ), I get the error below.
    </o:p>
    Could it be that the SlideShowExtender won?t work with <st1:place w:st="on"><st1:City w:st="on">Ajax 1.0 ? ASP 2.0? I?ve spent a couple hours on Google but haven't found any answers.
    </o:p>
    Or is it that my application on the web can?t find the AJAXExtensionsToolbox.dll and I need to change something in the Web.Config file or on the page itself?
    </o:p>
    The register directives on my form are:
    </o:p>
    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"</o:p>
    Namespace="System.Web.UI" TagPrefix="asp" %> </o:p>
    </o:p>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    </o:p>
    My SlideShowExtender declaration is:
    </o:p>
    <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server"</o:p>
    TargetControlID="Image1"</o:p>
    SlideShowServicePath="PhotoGallery.asmx"</o:p>
    SlideShowServiceMethod="GetSlides"</o:p>
    AutoPlay=true</o:p>
    Loop=true</o:p>
    PlayInterval=6000</o:p>
    ImageTitleLabelID ="ImageLabel1"</o:p>
    NextButtonID="NextButton" </o:p>
    PlayButtonID="PlayButton" </o:p>
    PreviousButtonID="PrevButton" </o:p>
    PlayButtonText="Play" </o:p>
    StopButtonText="Stop" </o:p>
    ContextKey="AudreyPix" </o:p>
    /> </o:p>

    </o:p>
    Again, everything works fine on my PC. Here?s the error I get:
    Server Error in '/' Application. </o:p>



    Parser Error </o:p>
    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Unknown server tag 'cc1:SlideShowExtender'.

    Source Error: </o:p>



    </o:p>Line 62: </o:p>Line 63: </o:p>Line 64: <cc1:SlideShowExtender ID="SlideShowExtender1" runat="server"</o:p>Line 65: TargetControlID="Image1"</o:p>Line 66: SlideShowServicePath="PhotoGallery.asmx"</o:p>

    Source File: /AudreySlides.aspx Line: 64 </o:p>


    Version Information:Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832
     
  2. Attached Files:

    • test.zip
      File size:
      990 bytes
      Views:
      304
  3. Vikram;
    </o:p>
    Thanks for getting back to me so soon. While your suggestion didn?t fix the problem, it led me to discover what the real problem was. Thanks again for your help.
    </o:p>
    I originally developed my application using the 3.5 version of the toolkit, which I did not realize was still in beta, but I discovered so when I tried running it on my website. So I changed all the references from 3.5 to 1.0. But as noted before, it still wouldn?t work.
    </o:p>
    I also have Microsoft .Net Framework 3.5 all installed, which, it turns out, was helping cause the problem. And I have both the 2005 as well as the 2008 beta editions of Visual Web Developer Express installed, which was why I originally installed version 3.5 of the Ajax toolkit, in order to work with VWDE 2008.
    </o:p>
    I pulled down the new version of the <st1:City w:st="on"><st1:place w:st="on">Ajax tool kit as you suggested, then set everything up per the instructions packaged with it.
    </o:p>
    However, the SlideShowExtender then stopped working on my PC, whereas previously it worked just fine on my PC but just wouldn?t work when I uploaded it to my website.
    </o:p>
    Then I uninstalled the Ajax Extensions (which I erroneously thought were version 3.5), downloaded version 1.0 and installed it. But it still wouldn't work.
    </o:p>
    Thinking the problem might be some obscure, behind the scenes reference issue, I created an entirely new Ajax-enabled website, then copied my SlideShowExtender code to the new page and copied the associated files to the new site.
    </o:p>
    It still wouldn?t work. However, when I ran debug, I got the following warning:
    </o:p>
    Warning 1 Assuming assembly reference 'System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' matches 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35', you may need to supply runtime policy</o:p>
    </o:p>
    So it appeared that it couldn?t find version 1.0 but it could find 3.5, even though I thought I had uninstalled 3.5 and there were no references to 3.5 in with my aspx pages or Web.Config.
    </o:p>
    The error message was actually the key to the problem.
    </o:p>
    After several hours on Google, I discovered that the <st1:City w:st="on"><st1:place w:st="on">Ajax 3.5 extensions are built into .Net Framework 3.5, and that VWDE can get confused and go to the 3.5 extensions even though you?re specifically telling it to go to 1.0.
    </o:p>
    Turns out there?s a known issue with Multi-targeting support in VS 2008 Beta 2 which was causing the problem. The Multi-targeting issue is described in some detail at:
    </o:p>
    http://blogs.msdn.com/webdevtools/archive/2007/07/30/using-vs-2008-to-target-asp-net-ajax-1-0.aspx</o:p>
    </o:p>
    Viola! Everything works now, both on my PC and on my website.
    </o:p>
    I provided the steps I followed in a separate post:
    </o:p>
    http://community.discountasp.net/default.aspx?f=24&amp;m=19630
    </o:p>
    Thanks,
    </o:p>Lar
     

Share This Page