title: Changing Blazor folder gives me "Cannot find the fallback endpoint"
body: <p>I created a default Blazor project and wanted to have a Web API part in the same project for prototyping purposes.</p>
  
  <p>So I put all the controllers and related in an <code>Api</code> subfolder and the Blazor stuff in a <code>Blazor</code> subfolder.</p>
  
  <p>The structure of the project:</p>
  
  <pre><code>- Api
    - Controllers
      - AController.cs
  - Blazor
    - Pages
      - _Host.cshtml
      - Counter.razor
      - Error.razor
      - FetchData.razor
      - Index.razor
    - Data
      - WeatherForecast.cs
      - WeatherForecastService.cs
    - Shared
      - MainLayout.razor
      - NavMenu.razor
    - _Imports.razor
    - App.razor
  - appsettings.json
  - appsettings.Development.json
  - Program.cs
  - Startup.cs
  </code></pre>
  
  <p><code>Startup.cs</code></p>
  
  <pre><code>public class Startup
  {
      public IConfiguration Configuration { get; }
  
      public Startup(IConfiguration configuration)
      {
          Configuration = configuration;
      }
  
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddHealthChecks();
          services.AddRazorPages();
          services.AddServerSideBlazor();
          services.AddSingleton&lt;WeatherForecastService&gt;();
          services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
          services.AddSwaggerGen(options =&gt;
          {
              options.SwaggerDoc("v1", new OpenApiInfo
              {
                  Title = "An API", 
                  Version = "Version Yoohoo"
              });
  
              var xmlFileName = Assembly.GetExecutingAssembly().GetName().Name + ".xml";
              var xmlPath = Path.Combine(AppContext.BaseDirectory, xmlFileName);
  
              options.IncludeXmlComments(xmlPath);
          });
      }
  
      public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
      {
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
          else
          {
              app.UseExceptionHandler("/Error");
              app.UseHsts();
          }
  
          app.UseHttpsRedirection();
          app.UseStaticFiles();
  
          app.UseRouting();
  
          app.UseEndpoints(endpoints =&gt;
          {
              endpoints.MapControllers();
              endpoints.MapBlazorHub();
              endpoints.MapFallbackToPage("/_Host");
          });
  
          app.UseSwagger();
          app.UseSwaggerUI(options =&gt; options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1"));
      }
  }
  </code></pre>
  
  <p>But now when starting the app, I am having the exception below:</p>
  
  <blockquote>
    <p>An unhandled exception occurred while processing the request.
    InvalidOperationException: Cannot find the fallback endpoint specified by route values: { page: /_Host, area: }.
    Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DynamicPageEndpointMatcherPolicy.ApplyAsync(HttpContext httpContext, CandidateSet candidates)</p>
  </blockquote>
  
  <p>How can I fix that?</p>