Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

ASP.NET Core をフォルダー発行で IIS に手動デプロイする方法

0
Posted at

はじめに

備忘録です。ASP.NET Core をフォルダー発行で IIS に手動デプロイします。

改訂履歴

  • 2026/05/11 : 初版公開。

本文

1. 環境

  • .NET 8.0
  • IIS 10.0
  • Visual Studio Community 2022

2. 方法

2-1. Visual Studio で発行する

プロジェクトの右クリックメニューから、発行を選択します。

公開場所はフォルダーを選択します。

フォルダーパスは必要に応じて変更し、完了をクリックします。

閉じるをクリックします。

発行をクリックします。

発行が成功したら、完了です。

2-2. IIS にデプロイする

先程発行したアプリケーションを IIS サーバーに移動します。今回は赤枠のフォルダに配置しました。

IIS マネージャーを開きます。アプリケーションプールの右クリックメニューから「アプリケーションプールの追加...」をクリックします。

名前は適当に設定します。.NET CLR バージョンは「マネージドコードなし」を選択します。ASP.NET Core は内部的には Kestrel 上で動作し、IIS はリバースプロキシサーバーとして機能するためです。

サイトの右クリックメニューから「Web サイトの追加...」をクリックします。

サイト名は適当に設定します。アプリケーションプールは先程作成したものを、物理パスは発行したアプリケーションを配置したフォルダを指定します。

2-3. 動作確認

IIS サーバー機から以下の URL にアクセスします。

サイトが表示されたら、成功です。

他の端末からもアクセスできるかを確認します。IIS サーバー機のファイアウォール画面を開き、ポートを開けておきます。

他の端末からアクセスし、サイトが表示されたら、成功です。

おわりに

2 回目以降は IIS を停止後、発行したアプリケーションを差し替えて、再起動すれば反映されます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?