title: Get Requests returning 404 on IIS but works locally
body: <p>I am hosting my MVC app (Angular Js + MVC 4) on an IIS  6.0 server. </p>
  
  <p>My Route Configuration below: </p>
  
  <pre><code> public static void RegisterRoutes(RouteCollection routes)
          {
              routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
              routes.MapRoute(
                  name: "Default",
                  url: "{controller}/{action}/{id}",
                  defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
              );
          }
  </code></pre>
  
  <p>below is the controller code: </p>
  
  <pre><code>public class HomeController : Controller
  {
      public ActionResult Index()
      {
          return View();
      }
           public JsonResult GetAppSettings()
      {
          try
          {
              string useAdvancedSearch = ConfigurationSettings.AppSettings["UseAdvancedSearch"];
  
              return Json(new { userAdvancedSearch = Boolean.Parse(useAdvancedSearch) }, JsonRequestBehavior.AllowGet);
  
          }
          catch (Exception ex)
          {
              return Json(new { message = ex.ToString() }, JsonRequestBehavior.AllowGet);
          }
      }
  }
  </code></pre>
  
  <p>My Ajax call in the angular js controller is below: </p>
  
  <pre><code>var ConfigService =
      function (configConstants, $http, $q) {
          this.getAppSettings = function () {
              var d = $q.defer();
              var get = $http({
                  method: "GET",
                  url: "Home/GetAppSettings",
                  dataType: 'json',
                  headers: { "Content-Type": "application/json" }
              });
              get.then(function (response) {
                  d.resolve(response.data);
                  console.log(response.data);
              }, function (err) {
                  console.error(JSON.stringify(err));
                  d.reject(err);
              });
              return d.promise;
          };
      };
  </code></pre>
  
  <p>This call is giving correct data in the local IIS express but when i run the same thing on the IIS, I am getting 404 error. </p>
  
  <blockquote>
    <p>Failed to load resource: the server responded with a status of 404
    (Not Found)</p>
  </blockquote>
  
  <p>My Url in localhost is : <code>http://localhost:63555/Home/GetAppSettings</code> </p>
  
  <p>The IIS server URL is : <code>http://******/apsecureeditor/WebApp/Home/GetAppSettings</code>
  The project is placed inside <strong>apsecureeditor/webapp</strong> folder on the server. 
  I am getting 404 error when i do this on the IIS server. 
  My framework is MVC 4, .net 4.0 and the version of IIS is 6.0. </p>
  
  <p>Is there anything I am missing here to include?</p>
  
  <p>EDIT 1: 
  I tried the below changes also on the server but no luck. </p>
  
  <p><a href="https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/deployment/using-asp-net-mvc-with-different-versions-of-iis-cs" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/deployment/using-asp-net-mvc-with-different-versions-of-iis-cs</a> </p>
  
  <p>Here is my routeconfig after this change.</p>
  
  <pre><code>  public static void RegisterRoutes(RouteCollection routes)
          {
              routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
              routes.MapRoute(
               "Root",
               "",
               new { controller = "Home", action = "Index", id = "" }
               );
  
              routes.MapRoute(
                  "Default",
                  "{controller}.aspx/{action}/{id}",
                  new { action = "Index", id = "" }
                );
          } 
  </code></pre>