Setting Up And Using Web Deploy with Azure WebRole in Visual Studio (One-Click partial update)

3.9k views Asked by At

I am using Windows Azure, and find it a lot difficult and useless make a new "Package" each time you make a small change, and want to test it on the Cloud. I heard about the opportunity to update the web roles without re-deploy the whole instance each time (about 15 minutes), and do a Web Deploy - upload just the modified files (some seconds).

None of the resources found on the web seems to describe this particular situation.

There are tutorials, on how to enable Web Deploy on Azure Web Roles, but not a one how to set it up. [This tutorial is showing the settings, but not for Azure]

1

There are 1 answers

4
d.popov On BEST ANSWER

To enable web deploy you first need to be able to do a standard Publish (not Package) from the CloudConfiguration project.

like here

there are some good tutorials how to do that.

While the Publish dialog is open, make sure to select this option, and make a normal publish.like so

After this configuration is published, you are ready to set up the Publish settings for the Web Role project. Note, the CloudCongiguration project is used for Package deployment, and the Web project is used to deploy to Azure via Web Deploy as deploying to normal web hosting.

When you click on the "Publish" context menu of the Web project, a "Publish Web" dialog appears. All settings are easy to guess/standard, except the second tab: Connection.

Connection tab Here the things go little hard, if you have not messed with Web Deployment before.

  1. Must select the Web Deploy method
  2. The URL to your Web Role (DNS or IP address found on Windows Azure Management portal)
  3. The name of the web site in the IIS on the Host machine. In our case this is the Azure WebRole instance. So Login via RDP, start "Server Management", navigate to: Roles->WebServer(IIS)-> Internet Information Services Manager. In the Connections Pane (The Left part of the Manager) expand the tree-view pointing to the "localhost" service -> Sites -> and there you find the Website Name (should be something like : xxxxx_IN_0_Web) website name

  4. This is the username you use for RDP connections /and the password below/

  5. is that strange URL, that is pointing to the Web deploy Service, that will eventually update our website content.

you can check, if the Package deployment went OK, in the Azure Management portal, on the Overview page of the web deployment if the port 8172 is open.

Now "Validate Connection" should succeed!

If not, try "http://{0}.cloudapp.net//MSDEPLOYAGENTSERVICE" for Destination URL