« Previous Next »

Thread: AJAX works on localhost, does not work on 127.0.0.1 or public IP

Last post 08-28-2009 11:15 PM by lextm. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 08-28-2009, 4:43 PM

    AJAX works on localhost, does not work on 127.0.0.1 or public IP

    Hello everyone, I'm am experiencing some strange beahavior with a website. I have a page that performs a simple AJAX request to fill a div. The data is fetched from a page in the same domain. When I perform the request using http://localhost/Dir/page.aspx? .... The requests work perfectly, but when using http://127.0.0.1/Dir/page.aspx? or http://public_ip/Dir/page.aspx? ..... My requests are simply ignored. I've used Firebug to track requests, and not even a single ajax request is performed. Normal requests ( such as fetching the main page that invokes the ajax code) works fine on both scenarios. Does anyone have any ideas of what might be happening? Thanks in advance !
  • 08-28-2009, 11:15 PM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 4:18 AM
    • Shanghai, PRC
    • Posts 1,402

    Re: AJAX works on localhost, does not work on 127.0.0.1 or public IP

    AJAX is a client side thing.

    If you use Mcirosoft ASP.NET AJAX, you can post the question to www.asp.net forums. If you use another AJAX tool, it vendor is your best resource.

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (2 items)
Microsoft Communities