views:

181

answers:

1

I have a problem in routing on the server (IIS6). It works OK on the development environment:

routes.MapRoute(
       "FindCities", 
       "FindCities/{state_id}",
        new { controller = "Regions", action = "FindCitiesByStateID", state_id = "" });

Here I call this action:

   $.ajax({
            type: "GET",
            contentType: "application/json; charset=utf-8",
            url: "FindCities/" + state_id,
            data: "{}",
            dataType: "json" 
            ...

All routes i have:

            routes.MapRoute(
                "Default",
                "{controller}.aspx/{action}/{id}",
                new { action = "Index", id = "" }
              );

            routes.MapRoute(
              "Root",
              "",
              new { controller = "Home", action = "Index", id = "" }
            );

I've tried url: "FindCities.aspx/" + state_id and "FindCities.aspx/{state_id}" and other variants, but it doesn't find the right way. What is the right way to write routes for IIS6? TIA

A: 

I've written a direct url, if you know how to write Routes for IIS6 please answer

        $.ajax({
            type: "GET",
            contentType: "application/json; charset=utf-8",
            url: "Regions.aspx/FindCitiesByStateID/",
            data: 'state_id=' + state_id,
            dataType: "json"
            ...
1gn1ter