title: Why could not my Blazor project consume MyProj.HttpApi.Client correctly?
body: <p>I used <strong>ABP CLI</strong> generated a MVC template, with which I would like to try a <strong>Blazor Server</strong> project. I do add a MyProjBlazorModule which was as same as every common Module, just like the <strong>ConsoleTestApp project</strong> did:</p>
  
  <pre><code>namespace MyProj.Blazor
  {
      [DependsOn(
          typeof(MyProjHttpApiClientModule),
          typeof(AbpHttpClientIdentityModelModule)
          )]
      public class MyProjBlazorModule : AbpModule
      {
      }
  }
  </code></pre>
  
  <p>Then I added the module as service to <strong>ConfigureServices</strong>  method:</p>
  
  <pre><code>    public void ConfigureServices(IServiceCollection services)
      {
          services.AddSyncfusionBlazor();
          services.AddRazorPages();
          services.AddServerSideBlazor();
          services.AddSingleton&lt;WeatherForecastService&gt;();
          services.AddApplication&lt;TaurusBlazorModule&gt;();
  
      }
  </code></pre>
  
  <p>for a rapid test, I also copied <strong>ClientDemoService</strong> class from template project <strong>MyProj.HttpApi.Client.ConsoleTestApp</strong> , and I consume it in my index.razor like this:</p>
  
  <pre><code>@inject ClientDemoService _clientService
  ...
  protected override async Task OnInitializedAsync()
  {
  
      await base.OnInitializedAsync();
      profile = await _clientService.RunAsync();
  }
  </code></pre>
  
  <p>But it couldn't work, with a error message in browser:</p>
  
  <blockquote>
    <p><em>InvalidOperationException: No authenticationScheme was specified, and there was no DefaultAuthenticateScheme found. The default schemes can
    be set using either AddAuthentication(string defaultScheme) or
    AddAuthentication(Action configureOptions).</em></p>
  </blockquote>
  
  <p>while If I copy code identical to the console test project like this:</p>
  
  <pre><code>        using (var application = AbpApplicationFactory.Create&lt;MyProjConsoleApiClientModule&gt;())
          {
              application.Initialize();
  
              var demo = application.ServiceProvider.GetRequiredService&lt;ClientDemoService&gt;();
              profile = AsyncHelper.RunSync(() =&gt; demo.RunAsync());
  
          }
  </code></pre>
  
  <p>and it worked. I would like to know the difference between using ABP module and explicitly calling an ugly ServiceProvider method here, and how can I fix this issue in some correct and beautiful way?</p>
  
  <p>Thanks for everyone's help!</p>