Deploy Azure Website via MSBuild & WebDeploy, but with which credentials?
Asked Answered
P

1

21

I have a very simple ASP.NET MVC 4 application and I can publish it easily to my local or inhouse IIS via WebDeploy.

Deployment to Azure Websites works as expected on my local machine and with Visual Studio:

  1. Go to Azure Website Management
  2. Go to Dashboard
  3. Download the publish profile
  4. Import it in Visual Studio
  5. Publish

If i do this via command-line I get ERROR_USER_UNAUTHORIZED:

msbuild.exe My.Web.csproj /p:DeployOnBuild=true /p:PublishProfile="azure-web - Web Deploy" /p:Configuration=Release 

I can specify a /p:Password=??? parameter, but where can I setup this password? I can only download or reset the publish profile. The publish profile xml has an encrypted password in it and it seems that only Visual Studio is able to read it.

For FTP/Git publishing there is the "deployment user", but I can't use FTP publishing because it is currently not supported from the command-line (this is the exception I got) and this user has nothing to do with web deploy.

Any ideas?

Polity answered 8/5, 2013 at 6:17 Comment(0)
P
32

Found it: The ***.azurewebsites.net.PublishSettings file (which can be downloaded in the management portal) contains the password in clear-text (even if it looks like encrypted).

The inspiration comes from this blog post.

Polity answered 8/5, 2013 at 6:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.