Publish and Deploy an Application on Windows Azure
In a previous article we looked at how to build a basic Azure application using Visual Studio. We now continue with how to publish and deploy that the application. For this demo we will be deploying a Web Role on Azure.
- In the Visual Studio Solution Explorer right click the cloud project and select Publish…

This will result in Visual Studio rolling up the solution into a package containing two files – a .cspkg file which contains the code for the app and a .cscfg file which is the configuration settings for the app (as shown below). Once this is done, the Windows Azure developer portal will automatically be launched in the browser.
- In the online Windows Azure developer portal you will already have at least one project name – click on the appropriate project name. We now need to create a hosted service to run the application, so click New Service:

- On the Create A New Service page you will be presented with two options – Storage Account and Hosted Services, as we are looking to host and run an application - click Hosted Services.
- Enter a Service Label which will enable you to identify this hosted service (this will not be visible to the public). The Service Description is optional.
- On the Create A Service page enter a Public Service Name for the app. You will also need to configure the Affinity Group settings. Most applications have several parts – databases, storage, processes etc. For optimum performance these should be located as geographically close as possible to eachother.If the application is simply a standalone app which doesn’t require any other services click the No radio button, otherwise you should create a new Affinity Group and select a geographic region (which should be the region you expect the majority of your application’s traffic to come from). Click Create once this has been done.

- Azure will now create an environment for hosting the application and you will be shown the main Hosted Service page. Click Deploy…
- In the appropriate fields browse to the the configuration and code files which were created by Visual Studio. Enter a Service Deployment Name and click Deploy:

- The application has now been provisioned and configured but is not yet live and running. To start the application click Run. There will be a pause of several minutes while Azure starts the application. During this phase it will go through two intermediate stages – ‘Initalizing’ (which creates the instances for running the app) and ‘Busy’ (which wires up the app to the load balancer and tests the app is available). Finally a ‘Ready’ status will finally be displayed and the application is now live.
- Click the ‘Web Site URL’ link to see the application running live.




31. Jan, 2010 







Hi,
Suppose I want to monitor my application performance and availabilty such that how CPU consumtion/Application Availablibty or other aspects realted to Performance and Service Avaialability ..
Like we used to monitor by SCOM in .NET Framework/IIS Server etc.
So in MS Cloud enviroment what features could we monitor ?
Thanks
Syed
The Azure diagnostics API can monitor an Azure app (see my article here which introduces the API and runs through a very basic logging example) if this is combined with the Azure service management API (which can configuration elements such as instances) then you should have they monitoring/dynamic configuration that you are looking for.
I’m planning an article on the service management API soon.
This didn’t work for me.
1) When I did the publish, I was presented with a page telling me I had to sign up for Windows Live.
2) I signed up for Windows Live but it still does not work. Now when I publish, I am presented with a sign on screen to Windows Live. After signing on, I am told I have no projects.
I’m not really sure what is happening on this Jon, but it is for sure a signing in or sign-up issue, and Azure is for sure not the easiest thing to sign-up for. If you are properly signed in you should be able to create projects and then have the projects appear in your listing, if this isn’t the case I would just contact Microsoft’s support.
Thanks. Yes that was it. I had a terrible time getting the account to work correctly, but now your tutorial works great! Thanks for your help!!