locked
IIS deployed version not running auto complete functionality RRS feed

  • Question

  • User318043356 posted

    Hi,

    I have implemented auto complete functionality in my ASP.NET webforms application

    This functionality is perfectly working fine on my development machine when run from VS 2010.

    I published the application and run it on IIS , but now the autocomplete functionality is not working , I also tried it with web service ,it works on local machine but not on IIS , please note that I have checked and placed all the missing files and folders which published folder didn't generated , I request your help

    function SearchText() {
                $("#<%=seasonTextBox.ClientID%>").autocomplete({
                    source: function (request, response) {
                        $.ajax({
                            type: "POST",
                            contentType: "application/json; charset=utf-8",
                            url: "Demo.aspx/getdata",
                            data: "{'data1':'" + document.getElementById('seasonTextBox').value + "'}",
                            dataType: "json",
                            success: function (data) {
                                response(data.d);
                            },
                            error: function (result) {
                                alert("Error");
    
                            }
                        });
                    }
                });
            }



    Tuesday, July 23, 2013 3:49 AM

Answers

  • User527778624 posted

     Hi,
     
     Use below script paths for CDN use,
     jquery from CDN:
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
     jquery-ui from CDN:
      <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
     
      change the protocol if u use https, and change the version number depending on ur requirements
      check this site for versions hosted in CDN.

    https://developers.google.com/speed/libraries/devguide#jquery


     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 24, 2013 1:44 AM

All replies

  • User289622470 posted

    Hi,

        This might be a problem with the relative path reference to jason method "Demo.aspx/getdata", you can try with Firebug or any similar console to check if the ajax request is getting fired to the right resource.

       Can you try changing url to url: "/Demo.aspx/getdata" and see if it works.?. Coz while you deploy in IIS your path might have changed.

    Thanks,

    Tuesday, July 23, 2013 4:06 AM
  • User318043356 posted

    Thr Fire bug says theat autocomplete is not a function.

    I tried /Demo.aspx/getdata 

    The Jquery file is present at  rootFolder/Scripts/jquery-1.10   in server file system

    Tuesday, July 23, 2013 4:36 AM
  • User527778624 posted

    Hi,

    You can check if JQuery and JQuery-UI files are loaded or not via firebug - scripts tab.

    make sure those 2 files are loading correctly in browser.

    alternative u can use any CDN for these 2 files loading.

    Tuesday, July 23, 2013 4:58 AM
  • User318043356 posted

    the jquery files are there in the same folder as in VS

    How can I make sure ?

    Please let me know some more info regarding CDN ,

    Tuesday, July 23, 2013 6:13 AM
  • User527778624 posted

     Hi,
     
     Use below script paths for CDN use,
     jquery from CDN:
     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
     jquery-ui from CDN:
      <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
     
      change the protocol if u use https, and change the version number depending on ur requirements
      check this site for versions hosted in CDN.

    https://developers.google.com/speed/libraries/devguide#jquery


     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 24, 2013 1:44 AM