Posted by : Sudhir Chekuri Wednesday, 28 October 2015

You should have a Microsoft Azure account to work on Azure which is a Microsoft cloud platform. It helps you to host your applications, databases and lot more in cloud which can be managed easily using azure management portal.

Azure portal link

https://manage.windowsazure.com/

You can create a 30 day trial account by signing up using credit card details.
1 $ will be charged for account creation and you can use the cloud services upto $200 for free within 30 days.
If you want to use more data you have to accept pay as you use option. Amount will be charged from your credit card after you accept it.
Usage details will be available in the portal.



Open visual studio 2013 or later versions(I am using VS 2015 community for this example).
Create a new project - Web - ASP.NET Web application using .NET Framework 4.5.
Select Empty template - Select a check box host in cloud  and select Web app from dropdown under  Microsoft Azure block.

Now configure Microsoft Azure Web app
Enter app name and also service, plan names if they are not configured in portal and using Azure account for the first time.

Click on Ok and it will create a website in Azure. You can also see it in the azure portal by going through websites tab in azure portal.
Now add a web form in visual studio and design the page with some content like hello world.
Check the output in the local host in visual studio.

Hosting it to azure:

Right click on the project root folder and click on publish.
Give some options required to validate connection and selecting publish method as Web Deploy.
Click on Next to select release - Next
Have a preview of the files that you are publishing click on publish to publish it to azure cloud.

Now after successful publishing our website in azure will get launched automatically in the browser. and refresh the page to see the output of your site.

Snapshot of azure portal after publishing website to azure.

Configuring Startup page for azure site:

Open azure portal - Click on Web apps in left pane - Click on the web site name
Go to configure tab - Go to default documents section where you find existing default page names. You can also add new or remove existing default document names here.

Video tutorial link

Microsoft Virtual Academy Azure Website Link

Authentication:

Authentication is of different types:
1. Using login and password in website.
2. Using management certificates using private key and public key to authenticate services.
A single subscription can have 100 certificates only. So 100 apps can use authentication using certificates.
3.  Three roles owner, contributor and viewer

How to get Azure certificate?

Login into Azure management portal and open the below link to download the certificate which you can use to authenticate with certificate. It is an xml file contains key to authenticate to azure from visual studio.
https://manage.windowsazure.com/publishsettings/index

Using Azure certificate in visual studio through import option?

Right click on Azure Root folder in Server explorer and click on manage and filter subscriptions.
Under certificates tab import option can be used to browse and select downloaded certificate from portal and click on import. You can see 1 certificate added under certificates tab.
Make sure that you have added your subscription details as well.

Reference link: Azure certificates

In your web project you can see .pubxml file in properties -> PublishProfiles folder which is used to store publish settings.
In the same folder you will also have your encrypted password saving file but it is only visible if you go to that folder location but you can't see it in solution explorer of visual studio for security reasons.
This password is used to authenticate while publishing files and project from different resources to Azure.
A publishsettings file is also known as an Account file.


{ 3 comments ... read them below or Comment }

Followers

Total Pageviews

Powered by Blogger.

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -