In this article we will see on how to create a new Hosted service in Windows Azure portal. Hosted services are used to host our application online with the configuration files created during publishing our application. In hosted service
Microsoft has provided many options for the developers to configure based on their requirement like selecting the region where the data server can reside, selecting the environment to deploy the application and adding certificates.[more]
Different environments are provided in Azure portal to test our application like deploying first in stage server and then deploy it in production server and to add some online certificates etc.
Lets us see on how to create a storage account after we have successfully created the configuration files.
Configuration Files :
Once we developed our application we have two ways to deploy it to the hosting services in azure. First is the creating service package and do a manual upload to the hosting service in azure. Second is uploading the publish directly from Visual studio. We can have full control of the hosting service only if we go with the first option. Once we create a service package(See my first article on how to create the service package) we will get 2 files as shown below
- .cspkg file - Package configuration file
- cscfg file – Service Configuration file
Once we have created the package files, now we are in the process of publishing our application online to the cloud using the hosted service.
Now go to the management portal as shown in the screen below using the link
Login using your Microsoft Windows Live credentials to the management portal and you will see the screen as shown in the screen below
Now we can see the Hosted Service option at the Left top corner of the screen. This option will help us to configure the hosted service for our application to be available in the cloud. Click on the hosted service will open a pop up as shown in the screen below
Name of the service – This option we need to enter the name of the service which we are going to host on the server. This can be of any name as per our convenience since its been maintained internally to identify the service
URL Prefix : This is a very important configuration, we need to specify the application prefix as it appears as the domain specific url to be available on the cloud.
Choose Region: This option is quite open, we can select the different region of the datacenters available to deploy our application. We can use a standard region across our application usage portion so that at the time of creating the Azure connect we can create different endpoints pointing to the same location.
Deployment option: We can select to deploy our application in stage or production server as selecting the option available.
Package Location & Configuration file – We need to select the published files which we got after publishing the application locally.
We can see the screen like below after making these configurations.
After making the above configuration click on OK button to complete the configuration. Now we can see the publish getting ready as it shows the status as shown in the screen below
It might take quite some time to make the application online. We should not refresh or hit F5 to refresh the page. We can see the web role been hosted as shown in the screen below
Once the deployment is ready we can see the hosted service as shown in the screen below in the azure portal.
We can see the hosted service url and the complete production path by click on the deployed application name as shown in the screen below
Clicking on the production url will open our application on the cloud as shown in the screen below
In this article we have seen on how to host a new service in windows azure portal with the different options to configure and use it on the cloud based on the requirement.