locked
How to use Web Deploy and FTP publishing from VS 2010 against Windows Azure Websites (Without using Azure SDK) RRS feed

  • General discussion

  • Without Windows Azure SDK installed, VS 2010 does not have support for publishing profile for Web Deploy and FTP publishing. You need to manually set the service URL and credentials to publish applications to Windows Azure Website.

    Please follow the steps below to configure your publishing.

    Web Deploy

    1. In Publish method dropdown, select Web Deploy
    2. Service URL text box needs the URL that starts with “waws”. You can download your publishing profile from the Azure portal and open it in notepad to get the exact URL. It looks something like below,

    waws-prod-blu-001.publish.azurewebsites.windows.net:443

    1. Make sure to append this with https and add /msdeploy.axd at the end, making the URL look like,

    https://waws-prod-blu-001.publish.azurewebsites.windows.net:443/msdeploy.axd

    1. Enter your Website name in Site/application box
    2. Make sure to check the box “Allow untrusted certificate
    3. In username box, just enter your username (no need to append with Site Name)
    4. Enter your password

    NOTE: You can set your deployment user credentials from Azure Portal as well.

    1. Click on publish and this should work.

    See Image below for quick reference.

    FTP

    1. In Publish method dropdown, select FTP
    2. Target Location text box needs the URL that starts with “waws”. You can download your publishing profile from the Azure portal and open it in notepad to get the exact URL. It looks something like below,

    ftp://waws-prod-blu-001.ftp.azurewebsites.windows.net/site/wwwroot

    1. Check the “Passive Mode” check box
    2. Enter username with your site name appended. For example, SiteName\Username
    3. Enter your password

    NOTE: You can set your deployment user credentials from Azure Portal as well.

    1. Click on publish and this should work.

    See Image below for quick reference.


    Apurva Joshi, This posting is provided "AS IS" with no warranties, and confers no rights.


    Thursday, June 7, 2012 11:45 PM

All replies

  • Don't forget that the website username is going to need the $ on the front. If your Azure Website subdomain is mysite, then enter the username as $mysite. Also, the password can be pulled from the .PublishProfile file ... it's a long hashed string.
    Friday, June 8, 2012 7:10 AM
  • Hi.

    I tried from VS it works fine. But once I try to run it from cmd I'm unable to deploy.

    I'm building the project with target=Package and getting folder with zip and cmd file.

    Than i run

    C:\repos\vc\DeployPackage>VC.deploy.cmd /y "/m:https://waws-prod-blu-001.publish.azurewebsites.windows.net/msdeploy.axd" /u:sitename\login /p:password

    I was unable to deploy it getting this error:

    Error Code: ERROR_USER_NOT_ADMIN
    More Information: Connected to 'waws-prod-blu-001.publish.azurewebsites.windows.
    net' using the Web Deployment Agent Service, but could not authorize. Make sure
    you are an administrator on 'waws-prod-blu-001.publish.azurewebsites.windows.net
    '.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_
    ADMIN.
    Error: The remote server returned an error: (401) Unauthorized.
    Error count: 1.

    Could you please help how to deploy the package from command line. Thank you.

    • Edited by hancharou Saturday, June 9, 2012 8:33 AM
    Saturday, June 9, 2012 8:21 AM
  • I think you might be using the wrong username: try using $login instead of sitename\login ... not sure if the password should be the hashed version from the .PublishProfile or not ... try the password both ways and see what happens.
    Saturday, June 9, 2012 6:04 PM