title: ASP.NET Core WebAPI 500 Internal error in IIS 7.5
body: <p>I'm struggling to get this WebAPI to work. Well, work with IIS. Everything works fine in IIS express, but when I publish it, specifically 1 api request doesn't work. I'm trying to access a url of <code>API/[Controller]/{date}/{integer}</code>. I keep getting the 500 server error. My other route of <code>API/[Controller]/{date}</code> works. </p>
  
  <p>Here's my API Controller:</p>
  
  <pre><code>[Route("api/[controller]")]
      public class PostingsController : Controller
      {
          // GET: api/Postings/5
          [HttpGet("{date}")]
          public string Get(string date)
          {
              return date;
          }
  
          // GET api/Postings/20160407/2
          [HttpGet("{date}/{modeID}")]
          public List&lt;TruckPosting&gt; Get(string date, int modeID)
          {
              TruckPosting tp = new TruckPosting();
              List&lt;TruckPosting&gt; truckPostings = tp.GetTruckPostings(date, modeID);
              return truckPostings;
          }
      }
  </code></pre>
  
  <p>Could the reason be that I'm trying to return a List&lt;>? I'm stumped considering it works fine in VS's IIS Express.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Here's my startup.cs page:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
          {
              services.AddMvc();
          }
  
  public void Configure1(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
              {
                  app.UseIISPlatformHandler();
                  app.UseDefaultFiles();
                  app.UseStaticFiles();
                  app.UseFileServer(true);
                  app.UseMvc();
              }
  
              // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
  public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
              {
                  app.Map("/appRoot", (app1) =&gt; this.Configure1(app1, env, loggerFactory));
              }
  </code></pre>