0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

System.InvalidOperationException: 'Unable to configure HTTPS endpoint.

Last updated at Posted at 2022-08-17

デバッグ時にエラーが発生し実行できなくなる

エラーはMainで発生し、下記のメッセージが表示される

エラーメッセージ
System.InvalidOperationException: 'Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.'

環境

  • Windows10 Pro
  • Visual Stuido 2022 Pro
  • .NET5 C# MVC

解決策

次の2つのコマンドを実行する

.NET CLI
dotnet dev-certs https --clean
dotnet dev-certs https --trust

解決策の出所

下記ページの「証明書に関する問題のトラブルシューティング (信頼されていない証明書など)」を参照

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?