LoginSignup
0
0

More than 1 year has passed since last update.

Visual StudioでAzure FunctionsをAzureに発行しようとしたところ failed with HTTP status code Forbidden エラー

Posted at

はじめに

Visual Studio上からAzure Functionsを発行しようとしたところ、以下のエラーメッセージが表示され発行できませんでした。

The attempt to publish the ZIP file through https://xxx.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code Forbidden.

状況

  • Visual StudioでタイマートリガーのAzure Functionsプロジェクトを作成
  • Azure Portal上でAzure Functions(関数アプリ)を作成、ここに開発用PC上のVisual Studio上から発行をしたかった(お遊びアプリ作成のためなのでCI/CDは考慮せず、Azure Functionsをサクッと試してみたかった)
  • Azure Functions上で発行プロファイルを取得し、Visual Studio>発行からプロファイルをインポート
  • ZipDeployをすると冒頭のエラーメッセージが表示され、発行に失敗した

原因と解決

Azure Functions作成時にアクセス制限でパブリックアクセスを許可していないためでした。
開発用PCからアクセスできるよう、関数アプリ>ネットワーク>アクセス制限から適切に設定することで解決しました。

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