简体   繁体   中英

How to FTP to a Azure WebApp Deployment Slot file system

I have an Azure WebApp and have added a deployment slot for my staging environment. I need to FTP to the deployment slot, however there seems to be only a single FTP user which always connect to the file system of the main webapp.

If I set the FTP user on the deployment slot app then it overwrites the main FTP user.

How can I FTP to the file system of the Deployment slot?

You need to use what are referred to as Site-Level Credentials. Details on the difference between User-Level and Site-Level credentials is available here .

Site-Level credentials are specific to your site and since a deployment slot is really just another site, you get the level of granularity you're looking for.

To get the Site-Level credentials for your web app, download the Publish Settings file for your site. You can do this from the web app blade in the portal by clicking on More -> Get Publish Profile . Repeat this from the web app blade for your deployment slot to get the Site-Level credentials for that web app (slot).

在此输入图像描述

In the Publish Settings file, you need the publishUrl , userName , and userPWD from the FTP profile. Note, there are two profiles in the Publish Settings file, Web Deploy and FTP . Make sure you're looking a the FTP profile in the Publish Settings file

在此输入图像描述

The publishUrl will be the same for your production web app and the web app in your deployment slot. However, the userName and userPWD will be different for each.

To use these credentials in an FTP client such as FileZilla, simply plug these values into the Host , Username , and Password fields as shown here.

在此输入图像描述

要获取与插槽相关的发布配置文件(例如,在此线程中查询),我们可以使用以下cmdlet。

Get-AzureRMWebAppSlotPublishingProfile -ResourceGroupName Default-Web-EastUS -Name propertiesdemo -OutputFile none -Slot dev

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM