title: ASP.NET Core 3.0 Endpoint Routing not working and getting 404 not found
body: <p>My endpoint routing is not working in my <code>asp.net core 3.0 Api</code>. I have seen similar questions but I am still not sure what is missing here.</p>
  
  <p>I have the following in <code>Startup.cs</code></p>
  
  <pre><code>   {
          public void ConfigureServices(IServiceCollection services)
          {
              services.AddOptions();
              services.AddControllers()
                  .SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
                  .AddNewtonsoftJson(options =&gt;
                  {
                      options.SerializerSettings.Formatting = Formatting.Indented;
                      options.SerializerSettings.Converters.Add(
                          new Newtonsoft.Json.Converters.StringEnumConverter());
                  });        
          }
  
  
          public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
          {
              if (env.IsDevelopment())
                  app.UseDeveloperExceptionPage();    
  
              app.UseRouting();
              app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapControllerRoute(
                      "test",
                      "api/v1.0/{controller}/{id?}");
              });
          }            
  }
  </code></pre>
  
  <p>My <code>Ping controller</code> looks like:</p>
  
  <pre><code> public class PingController : ControllerBase
      {
          public IActionResult Get()
          {
              return Ok(true);
          }
      } 
  </code></pre>
  
  <p>navigating to <a href="http://localhost/" rel="nofollow noreferrer">http://localhost/</a>/api/v1.0/Ping returns 404 page not found. </p>
  
  <p>What am I missing here ? I also saw that MS suggests attribute routing for Web Apis but wanted to figure out why this is not working in the first place.</p>