Azure 静态 Web 应用程序 Blazor WASM .Net Core API 和身份 - 无法从“_configuration”加载设置

Azure static web app Blazor WASM .Net Core API and Identity - Could not load settings from '_configuration

我想将我的 VS 解决方案发布到 Azure 静态 Web 应用程序,我使用的模板包含 Blazor WASM、.Net Core API 和 API 中的身份验证。

它在我的本地机器上运行良好,但在作为 Azure 静态 Web 应用程序发布后,它运行但仍然授权...

错误是:

Could not load settings from '_configuration'

这是浏览器控制台:

客户端 - program.cs:

public class Program
{
        public static async Task Main(string[] args)
        {
            var builder = WebAssemblyHostBuilder.CreateDefault(args);
            builder.RootComponents.Add<App>("#app");

            builder.Services.AddHttpClient("x.ServerAPI", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress))
                .AddHttpMessageHandler<BaseAddressAuthorizationMessageHandler>();

            // Supply HttpClient instances that include access tokens when making requests to the server project
            builder.Services.AddScoped(sp => sp.GetRequiredService<IHttpClientFactory>().CreateClient("x.ServerAPI"));

            builder.Services.AddApiAuthorization();

            await builder.Build().RunAsync();
        }
}

需要帮助才能完成这项工作...

发生的事情是我的情况下缺少证书,我遵循了这个答案并且有效:

我不知道在我们必须进行身份验证时是否可以在没有证书的情况下工作,尝试进行密钥类型开发但不会进行身份验证..