Complete Guide to Deploying Your .NET Core Application on the Cloud

If you planning to deploy your .net core application on cloud then you are on right platform, here will explain the process of hosting your application on cloud. Deploying a .net core application to the cloud you to scale your app, enhance its reliability and read your users globally. In this article, I will guide you through the deployment of a .NET Core 3.1 application to the major cloud platforms (Microsoft Azure App Service, AWS Beanstalk, Google Cloud App Engine), let’s take you through the step-by-step process of developing your .Net core application on cloud.

1. Prepare Your .NET Core Application

Before you deploy, make sure your .NET Core app is ready for cloud deployment:

  • Test Locally: Run your application locally and make sure it’s working as expected.
  • Configuration: Use environment variables or configuration files to manage settings for different environments (development, staging, production).
  • Build for Release: Ensure that your app is built in release mode for better performance.

2. Choose a Cloud Platform

There are several popular cloud platforms for deploying .NET Core applications. Here are a few options:

Microsoft Azure: Microsoft Azure is a preferred choice for .NET Core applications due to its seamless integration with the Microsoft ecosystem. Microsoft Azure gives head-to-head competition to AWS for features, flexibility, and deployment of applications. It is a robust integrated platform that caters to companies of different sizes and requirements. AWS comes with a key feature which differentiate this platform from others that is its virtual guest operating systems and compatibility with Linux container platforms.

    • Scalable data warehousing
    • Blockchain technology
    • DevOps and IoT integration
    • Big data and predictive analytics
    • Game and app development

 

Amazon Web Services (AWS): AWS Offers a range of services for deploying and managing .NET Core applications. AWS is most popular and robust cloud computing platform for enterprise applications.

AWS infrastructure known for faster deployment of data all over the world without affecting the availability of services or performance. AWS supports all major operating systems and stand out as one of the best IaaS platforms for data availability, high performance, and the sheer number of applications.

 

          AWS offers around 18000 unique services including: –

·         App integration and data computing

·         Business productivity tools

·         Databases and storage solutions

·         Developer, engagement, and management tools

•    Machine learning and predictive analytics

 

Google Cloud Platform (GCP): Google Cloud Platform (GCP) is relatively new to the Infrastructure as a Service (IaaS) space, but it has made a significant impact in the market. GCP supports windows and Linux operating systems.

Most popular services of GCP:

·         Data management and storage

·         App development

·         SMB business analytics and AI

·         Productivity and workload management tools

 

 

AWS vs Azure vs Google Comparison Table

THE BASIS OF COMPARISON

AWS

MICROSOFT AZURE

GOOGLE CLOUD

Caching

Elastic Cache

Redis Cache

Cloud CDN

Processor

In AWS, 128 can be the maximum processor in VM

In Azure, it can be 128

In Google cloud, it is only 96.

App Testing

In AWS, the device farm is being used.

In Azure, DevTest labs are being used

A Cloud Test lab is being used in this.

GIT Repositories

AWS source repositories

Azure source repositories.

Cloud source repositories.

Platform as service

Elastic Beanstalk

Cloud Services

Google App Engine

Storage of Object

S3

Block Blob

Cloud Storage

Managed data warehouse

Redshift

SQL warehouse

Big Query

Kubernetes Management

EKS

Kubernetes service

Kubernetes engine

File Storage

EFS

Azure Files

ZFS and Avere

Serverless computing

Lambda is being used for serverless computing

In Azure, Azure functions are used.

In google cloud, Cloud functions are used.

API

Amazon API Gateway

Azure API Gateway

Cloud endpoints

Media services

Amazon Elastic Transcoder

Azure media services

Cloud video intelligence API

Website

Aws.amazon.com

Azure.microsoft.com

Cloud.google.com

3. Deploying on Microsoft Azure

Azure App Service is one of the most popular and fully managed platform for building, deploying, and scaling web apps.

·        Create an Azure Account:

  • Sign up for an Azure account if you haven’t already.

·        Create an Azure App Service:   

  • Go to the Azure portal and select “Create a resource.”
  •   Search for “App Service” and follow the wizard to create a new App Service.

·        Deploy Your App:

o    Via Visual Studio:

  •   Open your project in Visual Studio.
  •   Right-click the project and select “Publish.”
  •   Choose “Azure” as your target and follow the prompts to deploy directly to your Azure App Service.

o    Via GitHub or Azure Repos:

§  Set up continuous deployment by linking your GitHub or Azure Repos repository to the App Service in the Azure portal.

o    Via Azure CLI:

§  Install Azure CLI and use commands to deploy your app. For example:

				
					az webapp deploy --resource-group <YourResourceGroup> --name <YourAppName> --src-path <PathToYourApp>


				
			

o    Monitor and Scale:

·         Use Azure’s monitoring tools to keep an eye on your app’s performance and scale resources as needed.

4. Deploying on Amazon Web Services (AWS)

AWS Elastic Beanstalk is a popular choice for deploying .NET Core applications.

·        Create an AWS Account:

  • Sign up for an AWS account if you don’t already have one.

·        Create an Elastic Beanstalk Environment:

  • Go to the AWS Management Console and select “Elastic Beanstalk.”
  • Create a new application and environment for your .NET Core app.

·        Deploy Your App:

o    Using Visual Studio:

§  In Visual Studio, right-click your project and select “Publish.”

§  Choose “AWS Elastic Beanstalk” as your target and follow the steps to deploy.

o    Using AWS CLI:

§  Install the AWS CLI and use the eb command to deploy your app. For example:

				
					eb create <YourEnvironmentName> eb deploy
				
			

·        Monitor and Manage:

   o    Use AWS CloudWatch to monitor your app’s performance and adjust your environment settings as needed.

5. Deploying on Google Cloud Platform (GCP)

Google App Engine is a fully managed platform for building and deploying applications on GCP.

·        Create a Google Cloud Account:

      o    Sign up for a Google Cloud account if you haven’t already.

·        Set Up Google App Engine:

o    Go to the Google Cloud Console and create a new project.

o    Enable App Engine and choose your preferred region.

·        Deploy Your App:

o    Using the Google Cloud SDK:

§  Install the Google Cloud SDK and initialize it with your account.

§  Use the following commands to deploy your app:

				
					gcloud app deploy
				
			

o    Using Cloud Build:

§  Set up a Cloud Build configuration to automate the deployment process.

·        Monitor and Scale:

  •      o    Use Google Cloud Monitoring to track your app’s performance and configure scaling options.

Conclusion

Deploying your .NET Core app to the cloud can enhance its accessibility, performance, and scalability. Whether you choose Azure, AWS, or Google Cloud Platform, each offers robust tools and services to streamline the deployment process. By following the steps outlined above, you can get your application up and running in the cloud and focus on delivering value to your users.

 

For more clarity, you can refer to the video below:

Scroll to Top