ローカルに私のASP.NET Core Webサイトがうまく動作しましたが、Azureに公開する際に内部サーバーエラーが発生しました(「起動中にエラーが発生しましたアプリケーション ")。 found out more details on the exact errorをに、WebHostBuilder
をProgram.cs
にそれぞれ渡すことによって行われます。Azureポータルの「認証/承認」設定で外部認証が動作しない
System.ArgumentException: The 'ClientId' option must be provided.
これはStartup.cs
でConfigure()
の一環として、Googleの認証オプションを指します。
app.UseGoogleAuthentication(new GoogleOptions()
{
ClientId = Configuration[ "Authentication:Google:ClientId" ],
ClientSecret = Configuration[ "Authentication:Google:ClientSecret" ]
});
、これらが正常にStartup()
にユーザーの秘密を使用してロードされます。
if (env.IsDevelopment())
{
builder.AddUserSecrets<Startup>();
}
According to the documentation、ClientId
とClientSecret
は、Webアプリケーションの設定の「認証/承認」の下のAzureポータルで指定する必要があります。私が最初に指定したにもかかわらず、例外は存続します。
何か不足していますか?