asp.net mvc5 ajax post returns 404 after switching to IIS 7.5 from IIS Express
<p>I'm making an MVC5 app on Visual Studio 2012.</p>

<p>I wrote up an AJAX call and got it to work just fine, then I switched its web server to IIS 7.5 from the previously set IIS Express, now I get 404's on the AJAX calls when I run it.</p>

<p>(everything works fine if I switch back to IIS Express)</p>

<p>is there something I am missing?</p>

<p>FYI, I looked at this link first, but it didn't solve my problem:  <a href="https://stackoverflow.com/questions/26371688/asp-net-mvc-ajax-post-returns-404-not-found">asp.net mvc ajax post returns 404 not found</a></p>

<p>Controller code:</p>

<pre><code>[HttpPost]
public JsonResult GetExpenseData()
{
    var expenses = new ExpenseGridModel();
    expenses.Populate(); //todo: filter

    return Json(expenses, JsonRequestBehavior.AllowGet);
}
</code></pre>

<p>AJAX call (in expenseGrid.cshtml):</p>

<pre><code>&lt;script type="text/javascript"&gt;

    $().ready(function () {

        var $editExpenseDiv = $('#editExpenseDiv');

        $editExpenseDiv.hide();

        $.ajax({
                url: '/Main/GetExpenseData',
                contentType: 'application/json; charset=utf-8',
                type: 'POST'
            })
            .success(function (result) {
                LoadGrid(result, $("#expenseTable"), $editExpenseDiv, "This is the EDIT EXPENSE Div.");
            })
            .error(function(xhr, status) {
                alert(status);
            });
    });

&lt;/script&gt;
</code></pre>

<p>Index.html:</p>

<pre><code>--- BreadCrumb Bar ---

&lt;br/&gt;&lt;br/&gt;
@{
    Html.RenderPartial("_ExpenseGrid", Model.ExpenseGridModel);
}

&lt;br/&gt;

@{
    Html.RenderPartial("_NotificationGrid", Model.NotificationGridModel);
}
</code></pre>

<p>Route Config:</p>

<pre><code>public class RouteConfig
{
    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new {controller = "Main", action = "Index", id = UrlParameter.Optional}
        );
    }
}
</code></pre>