title: Unable to hit API after application is hosted on IIS
body: <p>I have created a very basic Web API project. When I run the application from VS and hit a url like <a href="http://localhost:57401/users/getmessage" rel="nofollow noreferrer">http://localhost:57401/users/getmessage</a> I am able to get the response. After I have hosted it on IIS and provided it binding I am unable to hit the same url. I am getting 404 error. The URL I hit is <a href="http://testapi.com:6060/users/getmessage" rel="nofollow noreferrer">http://testapi.com:6060/users/getmessage</a> and this gives a 404. If I hit <a href="http://testapi.com:6060/Default.html" rel="nofollow noreferrer">http://testapi.com:6060/Default.html</a> I get the page without any error. The 404 error is only for api. Here is the routing attribute I use for the controller method:</p>
  
  <pre><code>[Route("users/getmessage/"), HttpGet]
  </code></pre>
  
  <p>and the WebApiConfig.cs is like:</p>
  
  <pre><code> public static void Register(HttpConfiguration config)
      {
          config.EnableCors();
          // Web API configuration and services
  
          // Web API routes
          config.MapHttpAttributeRoutes();
  
          config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{action}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
  
          GlobalConfiguration.Configuration.Formatters.JsonFormatter.MediaTypeMappings.Add(new RequestHeaderMapping("Accept", "text/html", StringComparison.InvariantCultureIgnoreCase, true, "application/json"));
      }
  </code></pre>
  
  <p>What could be wrong? Where am I making the mistake?</p>
  
  <p>Here is the IIS image.<a href="https://i.stack.imgur.com/Xem3C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xem3C.png" alt="IIS Manager"></a></p>