Reputation: 5565
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?
Upvotes: 7
Views: 4634
Reputation: 11256
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.
You also need to enable FTP for the slot, under Configuration > General settings
Upvotes: 13
Reputation: 2673
maybe I'm dumb, but I couldn't get this to work....kept saying connection refused. Well, it turns out, that even though Azure provides the user/pass and URL, you still have to enable the FTP service in the General Settings
(under Configuration)**
normally, this set disabled, and until you enable it, your FTP creds won't work......good luck finding any documentation telling you that
Upvotes: 1
Reputation: 1321
To get the publishing profile respective to a slot, for example , as queried in this thread, we could have the following cmdlet utilized.
Get-AzureRMWebAppSlotPublishingProfile -ResourceGroupName Default-Web-EastUS -Name propertiesdemo -OutputFile none -Slot dev
Upvotes: 3