title: Webapi method Get with string parameter not getting invoked
body: <p>I am creating asp.net webapi with two get methods. One returns all the records while the other should be filtering based on a string parameter called countrycode. I am not sure for what reason the get method with string parameter doesnt get invoked. </p>
  
  <p>I tried the following uri's</p>
  
  <pre><code>http://localhost:64389/api/team/'GB'
  http://localhost:64389/api/team/GB
  </code></pre>
  
  <p>Following is my code</p>
  
  <p><strong>Web API</strong></p>
  
  <pre><code>public HttpResponseMessage Get()
          {
              var teams = _teamServices.GetTeam();
              if (teams != null)
              {
                  var teamEntities = teams as List&lt;TeamDto&gt; ?? teams.ToList();
                  if (teamEntities.Any())
                      return Request.CreateResponse(HttpStatusCode.OK, teamEntities);
              }
              return Request.CreateErrorResponse(HttpStatusCode.NotFound, "Team not found");
  
          }
  
          public HttpResponseMessage Get(string countryCode)
          {
              if (countryCode != null)
              {
  
                  var team = _teamServices.GetTeamById(countryCode);
                  if (team != null)
                      return Request.CreateResponse(HttpStatusCode.OK, team);
              }
  
              throw new Exception();
          }
  </code></pre>
  
  <p><strong>WebAPIConfig</strong></p>
  
  <pre><code>public static class WebApiConfig
      {
          public static void Register(HttpConfiguration config)
          {
              // Web API configuration and services
              // Configure Web API to use only bearer token authentication.
              config.SuppressDefaultHostAuthentication();
              config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));
  
              // Web API routes
              config.MapHttpAttributeRoutes();
  
              config.Routes.MapHttpRoute(
                  name: "DefaultApi",
                  routeTemplate: "api/{controller}/{id}",
                  defaults: new { id = RouteParameter.Optional }
              );
  
              config.Formatters.JsonFormatter.SupportedMediaTypes
              .Add(new MediaTypeHeaderValue("text/html"));
          }
      }
  </code></pre>