Host legacy WCF services in Azure - c#

Does anyone know what the options are for hosting legacy .NET4+ WCF services in Azure?
I have heard that App Services are not to be used, but I have trouble finding any sources.

You can host your WCF services in multiple ways
on IIS
as Windows Service
as Console App
For the windows Service / Console App, you can:
Setup a VM and also install it
For the other options:
You can deploy on App Service or also on a VM with IIS installed.
More info:
https://aspdotnetcodehelp.wordpress.com/2017/11/13/hosting-wcf-in-azure-app-service/

The basic areas to consider when migrating an existing .NET application to Azure are:
https://learn.microsoft.com/en-us/dotnet/azure/migration/choose
Compute choices
Database choices
Networking and security considerations
Authentication and authorization considerations
To host a WCF service in Azure, you can check out the following tutorials.
Expose an on-premises WCF service to a web application in the cloud by using Azure Relay
Deploying an existing WCF service to Azure

Related

WebAPI as Micro service in Cloud

Can we host the normal Asp.Net MVC WebApi built with c# code and not in .net core in Azure or AWS micro service platform?
Depends on what you mean micro service. Microservices is mostly an architecture and not a specific platform. They are related to containers in a sense, but it's not the same thing.
Based on this: https://azure.microsoft.com/en-us/solutions/microservice-applications/, related technologies include:
Service Fabric
Get automatic scaling, rolling upgrades, and self-healing from faults with a custom-built microservices framework.
Azure Kubernetes Service (AKS)
Use a fully managed Kubernetes service to handle provisioning, upgrading, and scaling cluster resources on demand.
Azure Functions
Build apps with simple, serverless functions that scale on demand based on the number of executions—without managing infrastructure.
API Management
Expose and publish specific parts of your applications as an API no matter where the implementation is hosted.
Kubernetes and ServiceFabric support containers which can be hosted on windows with iis, so the answer is yes.
The api management is agnostic and is used to expose, secure e.t.c your APIs.
You can even host .net web api on app service: https://learn.microsoft.com/bs-latn-ba/dotnet/azure/dotnet-howto-migrate-app-service?view=azure-dotnet
In app service you can scale up and scale out.
Functions are serverless and they are not related to MVC api, they need new implementations.

Deploy a self-hosted SignalR backend to Azure

I made a web application with the following architecture :
A React.js frontend (only client-side javascript, no Node.js server)
A SignalR self-hosted backend in a C# console app
I would like to deploy my setup to Azure but I am a complete newbie with Azure.
I should be fine deploying the front-end by following a tutorial like this one
but I can't find any resource about deploying a SignalR self-hosted backend.
I found some resources discussing about a ASP.NET MVC SignalR web application hosted in IIS on Azure, but not about a self-hosted one.
Should I be using an App Service for my backend? Any caveats?
Thank you for enlighting me
You can but it is not best performance wise, to host your SignlarR on IIS.
Reasons for not hosting in IIS include:
Environments where IIS is not available or desirable, such as an
existing server farm without IIS. The performance overhead of IIS
needs to be avoided. SignalR functionality is to be added to an
exising application that runs in a Windows Service, Azure worker role,
or other process.
In Azure you can run it as for example:
App Service (read more).
Windows Service (example and read more).
Worker role (read more)

How to deploy a web application with WCF as a cloud service using Windows Azure Pack?

We want to develop a web application as a cloud service on windows Azure. The application has the following architecture:
This application was a simple line of business winforms application, where any customer could purchase and use it. Now our company decided to redesign it as a web application where many customers can work on it in the same time. The core application will stay the same, just some simple customizations, it does some simple tasks in the database and sending emails and other things.
Now, Our company decided that we need to use windows Azure to publish the web application as a could service. We don't need to use any of the Azure storage nor SQL Azure database services, instead we will use our datacenter's storages and database. We just need to deploy the application as a cloud service, and we don't know where to start. I couldn't understand how to use windows Azure cloud services in this application. So my questions are:
Is this architecture valid with windows Azure? And where would be the role of Windows Azure and its cloud services in this archticture?
We don't need to host the application on Microsoft datacenters, instead we need to use it in our datacenter, when I searched I found the Windows Azure Pack for Windows Server, so can we use it so that we can host it in our datacenter? Does we need any extra cost consideration to use it? Where to start to use in our application?
I found some posts and tutorials (like this one here in SO) saying that I just have to create a new Window Azure Project and add a WCF Service Web Role, copy the application files from the old Web Service then host the same as a web application. Is that true? Is windows Azure just involved in the deployment and it doesn't has any effects in the internal architecture of the application?
You can deploy both your UI and Service back-end to Azure Web Roles. If you have any remaining WinForms application, they still can connect to the Service back-end. I would recommend that you also deploy your database to Azure if possible to improve performance and reduce latency. You can either use Azure SQL Database or you can create a SQL Server VM.
There are various interesting options to deploy layered applications to Windows Azure. You can read more about it here. http://serena-yeoh.blogspot.com/2014/01/layered-applications-and-windows-azure.html
You can also checkout a simple sample here
http://cloudsample.codeplex.com

Scalable WCF Web Service

I have written a stateless WCF REST Web service. The main consumer of this web service will be a mobile app. There could be 1000's of clients connecting to the web service simultaneously. And this number will increase in the future.
How do I deploy the WCF web service so that it scales nicely. I am guessing the web service will be hosted in multiple servers and a load balancer will distribute the traffic among there servers. Can anyone suggest a load balancer typically used for such a scenario?
Is there any other recommended way to deploy the web service for scalability?
Frankly speaking I haven't tried this... So this only a thought
I would Install Microsoft Azure Service Bus for Windows Server and then connect/setup all available instances of Web Service to the Service bus endpoint.
There is a buildin load balancer.
Pros:
There is a build in Load Balancer, easy.

LocalDb as storage for WCF service

I am planning the following and I am asking for advice / critics on the setup.
We want to move our user management code to a WCF service so that our client apps retrieve user data through that WCF API only.
The API (library) shall be using LocalDb for storage as default.
The WCF service shall use the library and expose its functionality.
Is that a sensible approach? We want to keep the user storage close to the service, but does LocalDb run when we install the service running as NetworkService? We can go with LocalSystem but only if required, of course.
If running as a service, would another services (e.g. both running as LocalSystem) be able to access the LocalDb?
Considering deployment: If the API creates / connects the LocalDb, would any other restrictions apply to deployment of the WCF service via MSI other than ".Net 4.0.2 needed"?

Categories

Resources