AutocompleteExtender not displaying results on prod server

Last post 07-06-2009 4:25 AM by Vince Xu - MSFT. 1 replies.

Sort Posts:

  • AutocompleteExtender not displaying results on prod server

    07-03-2009, 11:15 AM
    • Member
      11 point Member
    • dmohr
    • Member since 02-08-2006, 7:53 PM
    • Posts 9

    I have an autocompleteExtender that I wrote on my dev server and wanted to promote it to my prod server but it won't display the results of my query.  I am using framework 3.5 and vs2008 as my ide on both boxes.  I can see in debug that the webservice retrieves the data, 100 zipcodes, from the sql2008 database.  The webservice gets the results and places them in the arraylist to send back to the calling page but the results never appear.  I simply copied the project library from one server to the other and then changed the database references.  I am assuming that I have some version issue of os, ajaxcontroltoolkit, framework or something else.  On my dev box this works fine.

    My autocompleteextender looks like this:

    <ajct:AutoCompleteExtender ID="aceZipCode" runat="server" TargetControlID="txtZipCode" EnableCaching="true" CompletionSetCount="100" 
    							CompletionListCssClass="autocomplete_completionListElement" MinimumPrefixLength="3" 
    							CompletionListItemCssClass="autocomplete_listItem" CompletionInterval="300" 
    							CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
    							ServicePath="~\WebServices\ws_ZipCodes.asmx" ServiceMethod="GetZipCodesStartingWith" />


    and my webservice looks like this:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Collections;
    using System.Data.SqlClient;
    using System.Web.Services;
    using ASAWeb.Business;
    
    namespace ASAWeb.webservices
    {
        /// <summary>
        /// Summary description for ws_ZipCodes
        /// </summary>
        [WebService(Namespace = "http://tempuri.org/", Description = "Webservice to allow a autocompleter service lookup")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [System.ComponentModel.ToolboxItem(false)]
        [System.Web.Script.Services.ScriptService]
        public class ws_ZipCodes : System.Web.Services.WebService
        {
            protected ArrayList Zip_Arraylist = new ArrayList();
            protected ASAWeb.Business.ASAdbDataContext data = new ASAWeb.Business.ASAdbDataContext();
            [WebMethod]
            public ArrayList GetZipCodesStartingWith(string prefixText, int count)
            {
                //Dictionary<int, ZipCode> dictZipCodes = new Dictionary<int, ZipCode>();// As Dictionary(Of Integer, ZipCode)
                //List<string> lstZipCodes = new List<string>();
                //List<ZipCode> lstZip = new List<ZipCode>();
                try
                {
                    prefixText = prefixText + "%"; //add wildcard to end
                    //get from the database via stored proc
                    var zCodes = data.ZipCodes_GetInfoLike(prefixText, count);
                    foreach (var zc in zCodes)
                    {
                        Zip_Arraylist.Add(new string[] { zc.Code + " " + zc.City + ", " + zc.State });
                    }
                }
                catch (SqlException ex)
                {
                    throw ex;
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                return Zip_Arraylist;
            }
        }
    }

    Any ideas?


  • Re: AutocompleteExtender not displaying results on prod server

    07-06-2009, 4:25 AM
    Answer

     Hi,

    Did you get any client error ? If  that's the problem on PageMethod, please ensure your pagemethod is in aspx or code behind. You can also use web development helper to debeg it.


    Vince Xu
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Page 1 of 1 (2 items)