LoginSignup
1
0

More than 1 year has passed since last update.

.NET Framwork 2.0 のアプリを Azure AppService で動かしてみた

Posted at

背景と目的

以前書いた「.NET Framwork 2.0 のアプリを Azure AppService Hyper-V コンテナで動かしてみた」のソースコードを使って、今回はもっとシンプルに AppService のランタイムに ASPNET|V3.5 を指定して、同じアプリが動くか試してみました。

前提条件

以前書いたソースコードが Azure Repos にある前提となります。

AppService を作成

bash
# 環境変数をセットします
region=japaneast
prefix=mnraspnet
repourl=https://*******@dev.azure.com/*******/aspnetwebvb20/_git/aspnetwebvb20
repotoken=*****************

# リソースグループを作成します
az group create \
  --name ${prefix}-rg \
  --location $region

# AppService プランを作成します
az appservice plan create \
  --name ${prefix}-plan \
  --resource-group ${prefix}-rg \
  --sku FREE

# AppService を作成します
az webapp create \
  --name ${prefix}-app \
  --resource-group ${prefix}-rg \
  --plan ${prefix}-plan \
  --runtime "ASPNET|V3.5"

# Azure Repos からアプリをでプロします
az webapp deployment source config \
  --name ${prefix}-app \
  --resource-group ${prefix}-rg \
  --repo-url $repourl \
  --branch master \
  --git-token $repotoken

# AppService を開きます
open https://${prefix}-app.azurewebsites.net

参考

bash
# リソースグループを削除します
az group delete \
  --name ${prefix}-rg \
  --yes

https://docs.microsoft.com/ja-jp/dotnet/framework/migration-guide/version-compatibility#backward-compatibility

1
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
1
0