Hosting legacy ASP.NET (not ASP.NET Core) in ServiceFabric - azure

I am looking for the options to host existing ASP.NET Framework (not .NET Core, and not ASP.NET Core) applications in ServiceFabric hosted on-premise.
We host such legacy applications in IIS, as is the common practice I believe, and we are considering migrating them to an on-prem ServiceFabric cluster without (or at least, as little as possible) modifications.
I see that Visual Studio 2017 SF project templates do not have the "old ASP.NET", which makes me think that using old ASP.NET isn't preferred, if supported at all. I can understand that.
I understand that it is possible to deploy the application in a container with IIS, e.g. with Windows IIS.
Are there other possibilities?

I've been doing self-hosted ASP.Net WebAPI on Service Fabric for three years already. They did remove the .NET Framework WebAPI template when you create a Service Fabric App, but yes, you can still run a Self-hosted .Net Framework API on Service Fabric.
I still have my old code before so I pretty much do same thing over and over. This tutorial would help a lot. it's the basics of doing a self-hosted WebAPI, hosting it on HTTPS is another thing after that.

Related

How can I host a Asp.NET Core gRPC Service on IIS

I need to host my Asp.NET Core gRPC Service on IIS so that I can make it publicly available for others in my team so can you please provide a proper document or steps for hosting my gRPC service on IIS.
Hosting .net core application in IIS is not yet supported. For more details please go through link
This document states that ASP.NET Core gRPC can be hosted on IIS, but it carries extra requirements.
IIS requires .NET 5 and Windows 10 Build 20300.1000 or later.
HTTP.sys requires .NET 5 and Windows 10 Build 19529 or later.
So please check if it meets the requirements before trying to publish it on IIS:
Host ASP.NET Core on Windows with IIS.

Any update on OWIN in IIS take best of both world?

As working on converting .NET Core web api to .NET Framework, I had options of couple different ways of achieveing it and I end up reading below links and decide to go with OWIN in IIS.
Difference between OWIN and IIS
ASP.NET Web API 2 hosting differences
Getting started with OWIN in IIS
https://learn.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana#host-owin-in-iis
Before I actually put myself into this route, would there be any new updates on .NET Framework (not .NET Core) which beats this solution make it look old?

Using WebListener or OWIN as API Gateway for azure service fabric

We have 4 stateless services microservice in service fabrics which are using Kestrel as server. We need to expose those 4 services to the front end and have question regarding either to use WebListener or OWIN as server. Can any one tell which is better for performance. And also we have authentication service which is used to handle tokens.
By OWIN I'm assuming you're referring to Katana with Web API 2, which both implement OWIN.
In that case, the choice is really between "classic" Web API 2 with Katana and the newer ASP.NET Core with WebListener. I always recommend ASP.NET Core with WebListener for a few reasons:
We have official integration NuGet packages for ASP.NET Core in Service Fabric
These packages and their use cases are documented
Katana was largely a prototype for what would become ASP.NET Core. Most, if not all, new feature work is going into ASP.NET Core, not Katana, and ASP.NET Core is officially supported by Microsoft.

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

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).

Deploy ASP.NET MVC 4 to Staging and Eventually Windows Azure

I have an ASP.NET MVC 4 app. This will needs to be deployed to an internal IIS server, which is a Windows Server 2008 machine, for testing. Eventually, we will deploy the app to Windows Azure as a Web Role. From my understanding, there is a way to have a "private" cloud on Windows Server 2008.
What is the recommended way to deploy an ASP.NET MVC 4 app to a "private cloud"? Please bear in mind that this app will eventually go to the public version of Windows Azure.
Thank you,
If you eventually want to deploy on Azure, I would strongly recommend that you test on Azure. If this is a commercial project that you're working with and you want to do one month's testing that will cost you approximately $160 for two instances (you really do need to test with two instances). Compare that to the hourly rate of whoever has to setup and support the server and you're probably already ahead.
You can run your site on premise with IIS, SQL and even AppFabric caching (Velocity) and all of these are similar to what you get in Azure, but not the same. Windows Azure SQL DB (WASD) in particular has different restrictions to and a different performance profile than an on premise SQL Server DB. If you want to use Azure Storage, there is no on premise version of this.
I would get a Windows Azure VM (or doesn't matter, it can be an server on premises) and deploy through web deploy.
Here is a great blog post on how to get a VM up and running with web deploy with only one script:
Script Out Everything - Initialize Your Windows Azure VM for Your Web Server with IIS, Web Deploy and Other Stuff
I used Windows Server 2012 there and PowerShell 3.0. So, there might be a few things that are not available in Windows Server 2008 R2. However, I heard that PowerShell 3.0 is now available for down level OSes. If that's true, I would also recommend you to get it installed at the first place because it has new capabilities.

Resources