Hosting Website in Azure VM easily

A lots of developer often get confused how to host website in Azure VM. In this article I am showing step by step process.

Fire up the Visual Studio and from the File menu, click New Project. This will bring the “New Project” window.

      1. In theNew Project dialog box, choose either Visual Basic or Visual C# as your main programming language. I am going to stick with C# for this demo. Collapse the Visual C# and click Cloud > NET Web Application.
      2. Make sure that.NET Framework 4.5 is selected as the target framework then click OK. The next screen will show you all the available templates. For the demonstration of this tutorial I will simply pick MVC as my template. Select Virtual Machine from the drop down.

        Note: (The check box caption might be Host in the cloud or Create remote resources. In either case the effect is the same.)
      3. As soon you hit the OK button Visual Studio might ask you to sign in to your azure account. Expand the More Options and select Microsoft Azure Virtual Machines.
      4.  Up on your login you will see the “Create virtual machine on Microsoft Azure” dialog page. Give a suitable DNS name. If the DNS name is available you will see a green tick mark right after your site name. Select an Image that fits your criteria. Check the Enable IIS and Web Deploy option. Choose Size that can handle your load.
      5. Once you click OK in step 4 you will get a confirmation dialog box that tells you that your VM is in progress.
      6. Jump into your VM that you have just created using Visual Studio Wizard. From the Server ManagerManage Add Role and Features.
      7. Install the feature Simple TCP/IP Services from Add Roles and Features Wizard.
      8. Jump to the Azure portal and dig into your Virtual Machine. Check the ENDPOINTS and pay attention to the WebDeploy port.
      9. Go back to Visual Studio. Select your million dollar project that you want to host in your Azure VM. Right click in the project and GO for Publish… option.
      10. This will warn you about certificate issue. Click Accept.
      11. Enter your site name with the suffix
        You are done ! Congratulation !  Your Million Dollar site is now in Live and its running from your hosted Azure VM.

Thats all for today. Stay tuned for other cool Azure  topic 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s