title: .NET Core 3.1 API works fine locally but doesn't after deployment
body: <p>In a Web-Application, written in C# in .NET Core 3.1, i want to Display a Datatable of all the Blobs in one of our Company's Azure Blob Storages. For this i'm using Datatables.net in the Frontend with Ajax-Calls which target a selfwritten API in the same Web-App. The API should get all the searched Blobs, format them for easier viewing and then give them back to the Table. Locally it really works like a charm. However, soon after deployment i noticed that the Ajax-Call just simply returns a 404 Response.</p>
  <p>For reference:</p>
  <p>My API-Controller</p>
  <pre><code>[Route(&quot;Blob/api/[controller]&quot;)]
  [ApiController]
  public class BlobsController : ControllerBase
  {
      private readonly string _connectionString;
      private readonly string _container;
      private readonly BlobContainerClient _client;
  
  
      public BlobsController(IConfiguration configuration)
      {
          IEnumerable&lt;IConfigurationSection&gt; _blobStorageSection = configuration.GetSection(&quot;BlobStorage&quot;).GetChildren();
          _connectionString = _blobStorageSection.Single(e =&gt; e.Key == &quot;ConnectionString&quot;).Value;
          _container = _blobStorageSection.Single(e =&gt; e.Key == &quot;ContainerName&quot;).Value;
          _client = new BlobContainerClient(_connectionString, _container);
      }
  
      [HttpGet(&quot;{EncodedDelimiter}/{EncodedPrefix}&quot;)]
      public ActionResult GetBlobs(string EncodedDelimiter, string EncodedPrefix)
      {
          if (! StorageIsAvailable())
              return NotFound();
  
          string Delimiter = WebUtility.UrlDecode(EncodedDelimiter);
          string Prefix = WebUtility.UrlDecode(EncodedPrefix);
  
          Pageable&lt;BlobHierarchyItem&gt; BlobHierarchy = _client.GetBlobsByHierarchy(delimiter: Delimiter, prefix: Prefix);
  
          return Ok(EnrichBlobList(BlobHierarchy));
      }
  
      [HttpGet(&quot;init/{EncodedDelimiter}&quot;)]
      public ActionResult Initialize(string EncodedDelimiter)
      {
          if (! StorageIsAvailable())
              return NotFound();
  
          string Delimiter = WebUtility.UrlDecode(EncodedDelimiter);
  
          Pageable&lt;BlobHierarchyItem&gt; BlobHierarchy = _client.GetBlobsByHierarchy(delimiter: Delimiter);
  
          return Ok(EnrichBlobList(BlobHierarchy));
      }
  </code></pre>
  <p>Here the Ajax-Call Snippet</p>
  <pre><code> var Table = $(&quot;#BlobTable&quot;).DataTable({
          ajax:{
              url: &quot;api/Blobs/init/%2F&quot;,
              dataSrc: &quot;&quot;
          },
          processing: true,
          columnDefs:[
              {
                  &quot;targets&quot;: 0,
                  &quot;data&quot;: &quot;standartizedName&quot;,
              },
              {
                  &quot;targets&quot;: 1,
                  &quot;data&quot;: null,
                  &quot;render&quot;: function(full){
                      return renderTyp(full);
                  },
                  &quot;width&quot;: &quot;10%&quot;
              },
              {
                  &quot;targets&quot;: 2,
                  &quot;data&quot;: null,
                  &quot;render&quot;: function(full){
                      return renderDatum(full);
                  },
                  &quot;width&quot;: &quot;15%&quot;
              },
              {
                  &quot;targets&quot;: 3,
                  &quot;data&quot;: null,
                  &quot;render&quot;: function(full){
                      return renderAction(full);
                  },
                  &quot;orderable&quot;: false,
                  &quot;searchable&quot;: false,
                  &quot;width&quot;: &quot;10%&quot;
              }
          ],
          order:[[1, &quot;desc&quot;]],
          pageLength: 50
  
      });
  </code></pre>
  <p>And bc i have seen similar Problems where the Source-Problem was in StartUp:</p>
  <pre><code>        public void ConfigureServices(IServiceCollection services)
      {
          services.AddDbContext&lt;TestDbcontext&gt;(options =&gt; options.UseSqlServer(Configuration.GetConnectionString(&quot;TestDB&quot;),
              sqlServerOptionsAction: sqlOptions =&gt;
              {
                  sqlOptions.EnableRetryOnFailure(
                  maxRetryCount: 10,
                  maxRetryDelay: TimeSpan.FromMinutes(5),
                  errorNumbersToAdd: null
                  );
              }));
  
          if (Env.IsDevelopment())
          {
              UseFakeAuthenticationAndAuthorization(services);
  
              //UseAuthenticationAndAuthorization(services, Configuration);
          }
          else
          {
              //UseFakeAuthenticationAndAuthorization(services);
  
              UseAuthenticationAndAuthorization(services, Configuration);
          }
  
  
  
          services.AddControllersWithViews();
  
          RepositoriesTestGUI(services);
      }
  
      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
      {
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
          else
          {
              app.UseExceptionHandler(&quot;/Home/Error&quot;);
              // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
              app.UseHsts();
          }
          app.UseHttpsRedirection();
          app.UseStaticFiles();
  
          app.UseRouting();
  
          app.UseAuthentication();
          app.UseAuthorization();
  
          app.UseEndpoints(endpoints =&gt;
          {
              endpoints.MapControllerRoute(
                  name: &quot;default&quot;,
                  pattern: &quot;{controller=Home}/{action=Home}/{id?}&quot;);
          });
      }
  </code></pre>
  <p>Has someone else an Idea what could be the Problem? An API-Call is an absolute Necessity since the Storage contains 70k Files</p>
  <p>EDIT:</p>
  <p>By Request here are the Network Details</p>
  <p><a href="https://i.stack.imgur.com/S5NcL.png" rel="nofollow noreferrer">NetworkDetails</a></p>
  <p>Bc this is my first Post i can't put embedded Pictures in apparently</p>