MVC 3 Ajax calls fail

Discussion in 'ASP.NET / ASP.NET Core' started by stocksp, Aug 25, 2011.

  1. I've deployed an MVC 3 test application.
    It runs correctly except ALL simple JQuery AJAX calls fail.

    I don't have the problems with my local IIS server.

    Firebug shows data arriving but gives a '404 not found'
    I put in audit code and I can see the controller does not ever get the request.

    Is there an IIS setting I have access to or an Attribute setting I need on my controller methods so this AJAX request will get routed correctly?

    thanks for any help with this..

    P:)
     
  2. Do you have a corresponding Action in the controller? Have you setup your routes?
     
  3. Yes, let me say again:
    This is very simple code that runs fine on couple of different IIS boxes.
    I put in audit\debugging code and can see that the controller is never called.
    Firebug shows the Ajax call arriving at the server.
    I deployed the app here on your server:
    http://cornerpins.com/AjaxTestMVC
    I also put the complete VStudio project in the root if you want to see the simple code.
    http://cornerpins.com/AjaxTestMVC/ajaxTestMVC.zip.
    Its a trivial application.
    HomeController.cs has the method.
    Home\index.cshtml has the JQuery\Ajax call.
     
  4. Sorry, maybe Im slow today. But can you clarify what the issue is?

    If I visit http://cornerpins.com/AjaxTestMVC/home/index it looks like it pulls your view and hits the GetCurrentMonth method because it renders the calendar with the "somethings happening" text on the 12th.
     

Share This Page