I created a web application using Asp.net web api in azure and i want to consume it with a web role application ! what is the difference between web application and web role and what should i do ! thanks
-
2Possible duplicate of [What is the difference between an Azure Web Site and an Azure Web Role](http://stackoverflow.com/questions/10941488/what-is-the-difference-between-an-azure-web-site-and-an-azure-web-role) – Peter Feb 12 '16 at 20:59
2 Answers
An azure webapp is a website you host on azure as a normal website. you don't really have a lot you can do with the machine. Just see it as normal website hosting.
A webrole is part of a cloud service. Which is a bit more flexible. Web roles allow you to install for example applications on the vm you are running your application. The state of the machine is not held so if the machine goes down you lose all data you stored on it. In fact you upload a sort of zip package with the application inside. This installs the app and when something goes wrong a new machine is started and the package is installed again on that new machine. This is also 'an issue' with azure websites.
Here is a good link with some more info + with info on virtual machines which is in fact a layer lower, meaning that you have more control over the machine.
https://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/

- 1,405
- 13
- 10
In most of the scenarios Azure Web App is what you should use. It provides all the capabilities required for almost all websites.
However, Web App may not work in few scenarios e.g.,
- When you have a dependency on software or library that you need to bundle with your code
- You need to RDP into the machine for some purpose
- ...
In those scenarios you will have to depend on Web role.

- 1,149
- 1
- 7
- 20