Tuesday, March 25, 2014

How to Deploy ASP.NET web application in Windows Azure Virtual Machine

Are you searching for the steps to deploy ASP.NET web application in windows Azure Virtual Machine? Yes, in this article I am going to give you the step by step procedure to deploy the web application in cloud.
If you are not sure how to create Virtual Machine in Windows Azure you may read my article How to create Virtual Machine in Windows Azure
In this article I am explaining the steps you have to follow after creating the Virtual machine.
As usual first you have to login to the Virtual Machine by login to your Windows Azure account. You may open your Windows Azure account by opening Windows Azure Login Page

Once you login to your account click on Virtual Machine icon at the left menu to display all the Virtual Machine you have created.
image
To avoid additional billing from Microsoft I normally shut down VM once my usage over. So now we will start the Virtual Machine first.
image
Now we will connect to the VM by clicking on the connect button.
Just a refresh regarding the end point, since we are deploying web application in VM one important thing you have to remember is to create the HTTP end point otherwise you may not be able to open the website over the internet. If you are not sure how to create end point please read my earlier article How to create Virtual Machine in Windows Azure
VM WebApp Endpoint
Now we will open Visual Studio 2013 and create a demo website to do the deployment in Windows Azure Virtual Machine. We are not changing anything from the default page except some text as it is just a sample one.
image
Now we will publish this website. Just right click on your project and click on publish.
image
Once you click on Publish, it will open a window where we have select/create the profile. Since we are doing this first time, I am selecting the option New Profile.
VM WebApp publish 1
Enter any name, here I entered the name as DemoVMWebApp.
VM WebApp publish 2
Click Next to select the Publish Method. Here we will do the simple deployment by selecting the option File System from the dropdown list.
image
Since we have selected the Publish Method as File System we have to provide the Target Location. Here we provide the application name as DemoVMWebApp and provide wwwroot as the publish directory.
image
Click Next to select the Configuration. Since we are deploying the application we will select as Release.
VM WebApp publish 4
Click next to open the final Publish screen where you can review the path and also if you require you can navigate back to each option we have selected so far.
VM WebApp publish 5
Finally Click on Publish to deploy the web application in Windows Azure Virtual machine. Let’s check the wwwroot folder for the deployed file to make sure everything deployed properly.
image
Now it’s the time to open IIS and convert the directory created by the deployment to an Application. For that expand Default Web Site and then right click on the folder and then select “Convert to Application


 image
Once you convert to an application just browse the page to make sure it works fine at local host.
image
Now you can see that the webpage opens fine at local host.
VM WebApp Running After Publish
Now it is the time to access the same website over the internet. To access it over the internet you just need to replace the localhost with the DNS name of your virtual machine.
VM WebApp publish 6 
That’s it your demo web application created for testing the Windows Azure is online now!!!
Let me know if you have any doubt in above steps. You are always welcome to contact me or write comment below.

41 comments:

  1. Hi, when I converted it to a application, it didnt appear next to my folder. Where am i able to look for it?

    ReplyDelete
  2. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Dot Net Training in Chennai

    ReplyDelete
  3. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.

    ReplyDelete
  4. Your information was very clear. Thank you for sharing
    azure Online course

    ReplyDelete
  5. When I initially commented, I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove people from that service? Thanks

    Hadoop Training in Chennai
    Hadoop Training in Bangalore

    ReplyDelete
  6. The young boys ended up stimulated to read through them and now have unquestionably been having fun with these things.
    MEAN stack training in Chennai
    MEAN stack training in bangalore

    ReplyDelete
  7. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Devops Training in pune

    Devops Training in Chennai

    Devops Training in Bangalore

    AWS Training in chennai

    AWS Training in bangalore

    ReplyDelete
  8. From your discussion I have understood that which will be better for me and which is easy to use. Really, I have liked your brilliant discussion. I will comThis is great helping material for every one visitor. You have done a great responsible person. i want to say thanks owner of this blog.
    python training in tambaram
    python training in annanagar
    python training in OMR

    ReplyDelete
  9. I’ve desired to post about something similar to this on one of my blogs and this has given me an idea. Cool Mat.
    java training in chennai | java training in bangalore


    java training in tambaram | java training in velachery

    ReplyDelete
  10. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
    Data science course in tambaram | Data Science course in anna nagar
    Data Science course in chennai | Data science course in Bangalore
    Data Science course in marathahalli | Data Science course in btm

    ReplyDelete
  11. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    microsoft azure training in bangalore
    rpa training in bangalore
    rpa online training

    ReplyDelete
  12. Great information. Thanks for providing us such a useful information. Keep up the good work and continue providing us more quality information from time to time.
    Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  13. Thanks, Thank you for sharing your blog which enhances our knowledge and students career sector. I want to aware you towards our Online Education platform, content is valuable, it helps in developing knowledge it’s too worthy
    rpa training in chennai

    ReplyDelete
  14. Thank you for allowing me to read it and thanks for sharing the nice article, keep posting or updating the new article.

    Digital Marketing Training Center in Chennai

    ReplyDelete
  15. I am Here to Get Learn Good Stuff About Training, Thanks For Sharing
    Informatica Training.Informatica Training in Bangalore

    ReplyDelete
  16. Thank you for providing this kind of useful information,I am searching for this kind of useful information; it is very useful to me and some other looking for it. It is very helpful to who are searching Oracle Apps HRMS Training.oracle apps hrms training in bangalore

    ReplyDelete
  17. It is very good and useful for students and developer .Learned a lot of new things from your post!Good creation ,thanks for give a good information at SAS.SAS Training in Bangalore

    ReplyDelete
  18. Wow it is really wonderful and awesome thus it is veWow, it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot.

    python training in bangalore

    python courses in bangalore

    python classes in bangalore

    python training institute in bangalore

    python course syllabus

    best python training

    python training centers

    ReplyDelete
  19. This comment has been removed by the author.

    ReplyDelete
  20. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Digital Marketing Course
    AWS Course
    Python Course
    Selenium Course
    Data Science Course
    DevOps Course

    ReplyDelete
  21. Thank you for Amazing Article. Really This Will Help me For while I am Selecting Hosting.
    Web Hosting Service In Surat

    ReplyDelete
  22. Experience the ultimate Satisfactory Game Server solution. Enhance your gaming experience with unrivaled performance and reliability.

    ReplyDelete