Web API app with OWIN 'SystemWeb' on Azure App Service - azure

I am creating app which uses Identity 2.1.0 framework in .NET. I started project in Visual Studio 2015 as Empty Web App (template). Now, I use Microsoft.AspNet.WebApi.Owin, and also Microsoft.Owin.Host.SystemWeb NuGet packages in my project. I understand that OWIN is a specification made to avoid monolithic frameworks and to specify how smaller application components interact with servers. However, I have requirement to deploy to Azure App Services.
I have found examples (blogs) where people deploy OWIN Web Api app as self-hosted to the Azure Cloud Services worker role. But I don't want this, as I don't use Cloud Service.
Since I am using Microsoft.Owin.Host.SystemWeb, am I going to be able to deploy this to Azure App service (which I assume manages internal IIS instance) ?
.NET ecosystem newbie here - so please excuse me for any possible redundancies in the question.

Microsoft.Owin.Host.SystemWeb is designed for hosting in IIS and all Azure App Service web apps are hosted in IIS, so this is exactly what you want (In fact, self-hosting likely won't work with Azure App Service).

Related

Why should I prefer Azure App Service over .NET REST Web API?

Why should I use Azure App Service and not just implement a common .NET RESTful Web API backend?
What's the explicit benefit of this service compared to a common .NET RESTful Web API backend hosted on Azure?
An Azure App Service is a place to host your web application or API. Normally when you have a .NET web API you host it behind IIS or something on a virtual machine.
Azure helps you with these common scenarios wit Platform as a Service (PaaS). An App Service completely abstracts the operating system and the way you host your web application.
App Service can host web apps both on Windows and Linux. You can use all kinds of frameworks such as PHP, .NET or Java. You can even host containers without worrying about the host.
A good sample to start with hosting your .NET Web App on Azure App Services can be found here: Quickstart: Create an ASP.NET Core web app in Azure
Yes, there is a huge difference between Azure App Service and .Net REST WebAPI backend on Azure.
Hosting on Azure can be done using two ways
Create your own VM, then install IIS and do all the required stuff
Use AppService Plan
AppService Plan allows you to leverage the powerful functionality of Azure. Here a separate VM is not assigned to you. Azure App service can scale automatically depending upon the Scaling rule which is not present in restful API hosted on Azure VM.
My question blatantly was a stupid Newbie question, and as such, I'm afraid it is non-sense, which I now know by the answers you've given.
I'm currently reading the book "Azure and Xamarin Forms" to learn Xamarin and Azure. Apparently it's outdated. It suggests to "create a Mobile App on Azure". From the book that Mobile App is just a plain App Service running a RESTful Web API with EF, but utilizing completely different namespaces to do so.
My question targeted towards these other namespaces. I didn't see a reason for them.
Apparently, Microsoft noticed the same. There is no "Mobile App" available in the Azure Marketplace anymore.
Azure App Service is a PaaS solution from Microsoft hosted on Azure. You can think of Azure App Service as some sort of "Micrsoft Heroku", because they work on a similar fashion. For many REST Projects, it can save you hours, if not DAYS of development. It has automatic TLS like heroku, but it is hosted on Azure instead of AWS and it can integrate very well with your existing Azure resources. One common pattern is to host the REST API on App Service and use a database service from Azure such as Azure SQL or Cosmos DB (which is a NoSQL service that, from the point of view of your app, it operates as MongoDB, but can be configured to behave as other DBMS).

Limitations of Web App for Containers in Azure

We are planning to develop a new web application in Java or .NET. The application should be containerized using docker in Azure cloud platform and it should be scalable (user base at pick is about 80-90). Since, there is no need to develop a Microservice based application we have have planned to develop REST services in back end and Angular JS in front end as the application architecture.The Service back end will be deployed in web server and will run in one container and the Angular JS front end in another.
In this context will Web App for container in Azure App service would be the right choice?
What are the limitations of Web App for containers?
Is there any limitations with Web App for containers in Azure App service if the application is developed using Java Spring Boot?
Yes, it's a good choice to develop a web application in Java or .NET and containerized it for deployment easier.
The limitation, please refer to the section App Service limits of the offical document Azure subscription and service limits, quotas, and constraints.
And there is not any limits for using Java Spring Boot with WebApp for container on Linux. it's also same as do developing on Docker.
Additionally, just considered for developing REST service in back, I recommended you may use Azure Functions in Java that I think easier.
If you want to run just Spring Boot, you can also use the "Java SE" offering which is available for Windows or Linux in App Service. In this case you just deploy your code and you don't need to worry about managing containers, like updating the JRE version, etc.
However, if you are interested in deploying a containerized app, you can use Windows Containers or Linux Containers in Azure App Service.

Do we need iis server installed in azure cloud to host a web app in azure

If I need to host a web app in azure cloud, do I need to install windows server and iis in a VM or is there any other option like the web service running separately?
I have read azure app service while googled, if it's been used, Will it serve all the purpose of an iis?
In most scenarios you do not have to host a VM with IIS to host a web app in Azure. You can, but unless you want or need to manually manage a VM because you for instance need to install software on the server, there are simpler hosting alternatives.
Have a look at Azure App Service
Azure App Service is a service for hosting web applications, REST APIs, and mobile back ends. You can develop in your favorite language, be it .NET, .NET Core, Java, Ruby, Node.js, PHP, or Python. Applications run and scale with ease on both Windows and Linux-based environments.
EDIT:
As far as monitoring goes: there is a lot available to monitor the performance of an App Service. For instance:
Application Insights
Monitor apps in Azure App Service
EDIT2:
Will it serve all the purpose of an iis?
Are you looking for a specific purpose? Azure App Service brings you a LOT of possibilities. Sure, it's PaaS and therefore you're bound by the options available for the specific service. But you're also getting a lot of extra's IIS doesn't provide (out of the box). And when you're running a website that doesn't require you to install any COM stuff or something specific like that, there's nothing App Service doesn't provide.

What is the difference between an API App and a Web App in Azure?

Please Note: This is NOT a duplicate of What is the difference between an API App and a Web App?
The answer is outdated because the documentation changed and the quoted text was removed from the documentation.
So can someone explain me what the difference between API App and a Web App is? I can't find anything in the documentation.
Both API App and Web App are types of Microsoft Azure App Services. These are a platform as a service (PaaS) offerings from Azure.
API App is specific for developing RESTful APIs with feature like Swagger out of the box. Web App on the other hand is used to host Web Applications.
API apps in Azure App Service offer features that make it easier to develop, host, and consume APIs in the cloud and on-premises. With API apps you get enterprise grade security, simple access control, hybrid connectivity, automatic SDK generation
Web Apps is the compute resources that Azure provides for hosting a website or web application in App Service. The compute resources may be on shared or dedicated virtual machines (VMs), depending on the pricing tier that you choose. Your application code runs in a managed VM that is isolated from other customers.
Refer: https://www.quora.com/What-is-difference-between-Azure-API-App-and-Web-App

Migrating MVC application to AZure Appservice and Cloud Service [duplicate]

This question already has answers here:
What is the difference between an Azure Web Site and an Azure Web Role
(10 answers)
Closed 5 years ago.
I am using MVC application in VS2015.Now we are planning to migrate our MVC5 Web application to Azure app service. I am getting confused with cloud service with Azure app service.
Just wanted to check can we migrate MVC5 application to Azure app service ?
I have installed Azure SDK
Do i need to install VS 2017 to have Azure App service or with Azure SDK will work.
Does the cloud service project and Azure App service both are different?
Please help me in understanding more
There are many differences between Azure Web Apps and Cloud Services.
App Service Web Apps is a fully managed compute platform that is optimized for hosting websites and web applications. This platform-as-a-service (PaaS) offering of Microsoft Azure lets you focus on your business logic while Azure takes care of the infrastructure to run and scale your apps.
On the other hand, Cloud Services is an example of Platform-as-a-Service (PaaS). Like App Service, this technology is designed to support applications that are scalable, reliable, and cheap to operate. Just like an App Service is hosted on VMs, so too are Cloud Services, however, you have more control over the VMs. You can install your own software on Cloud Service VMs and you can remote into them.
More control also means less ease of use. Unless you need the additional control options, it's typically quicker and easier to get a web application up and running in Web Apps in App Service compared to Cloud Services.
In Azure App Service, deployment and management are integrated into the platform, sites can scale quickly to handle high traffic loads, and the built-in load balancing and traffic manager provide high availability. You can move existing sites to Azure App Service easily with an online migration tool, use an open-source app from the Web Application Gallery, or create a new site using the framework and tools of your choice.
Also, there are many ways in which one can perform direct code deployment to Azure App Service. You can use FTP/Kudu (Git/Mercurial or OneDrive/Dropbox)/Web Deploy etc.
Hope this clears your confusion.

Resources