Skip to main content

InProcess & OutOfProcess Hosting Model in ASP.NET Core

 

InProcess & OutOfProcess Hosting Model in ASP.NET Core

We are discussing about hosting in asp.net core and there are two types of hosting available on Asp.net core.

  1. InProcess hosting
  2. OutofProcess hosting

InProcess Hosting

When you create new application with empty template and run the application then default hosting model (InProcess hosting) launch your asp.net core applications.

This means ASP.NET Core Module forwards the requests to IIS HTTP Server. The IIS HTTP Server is a server that runs in-process with IIS and InProcess hosting application is hosted inside the IIS worker process.

 



 

OutOfProcess Hosting

In OutOfProcess hosting model then use internal and external hosting model.

There are use two type of web server:

1.Internal Web Server

2.External Web Server

 

1.Internal Web Server

the Kestrel web server is the internet-facing web server as all the HTTP requests are directly processed by it. and Kestrel is an open-source and cross-platform web server. That means this Server supports all the platforms like Windows, Linux, macOS

 


 

2.External Web Server

A Reverse proxy server which can be either IIS, Apache, etc. is used along with Kestrel web Server. A reverse Proxy server provides additional security as well as configurations that are not available in Kestrel Server. It also provides load balancing functionality.



 

There is difference between InProcess and OutOfProcess

InProcess

OutOfProcess

The request/responds process through is w3wp.exe or iisexpress.exe

The request/responds process through dotnet.exe

It is using Single web server

It is using two webservers

Great performance

Many proxying requests between internal and external web servers

 

Comments

Popular posts from this blog

How to find the count to convert a pyramid into a square using C#.net

Introduction   Let’s develop a simple C# console application to find the count of convert a pyramid into a square. Getting Started In ASP.NET 5 we can create console applications. To create a new console application, we first open Visual Studio 2015. Create it using File-> New-> Project. Now we will select the ASP.NET 5 Console Application to create the console application, click on the OK button. Include the following references in the application: using  System;   using  System.Collections.Generic;   using  System.Linq;  In the main method, I have created 2 methods 1.PrintPyramid – To print the triangle in given input. 2.ConvertPyramidToSquare = Convert triangle into square. Please refer the code snippet below: static   void  Main( string [] args)   {   try    {   PrintPyramid();   ConvertPyram...

Open Closed Principle

  Open Closed Principle We will be discussing the Open-Closed Principle also known as OCP, as one of the SOLID principles of object-oriented programming and how to implement it when designing our software. This principle said that should be open for extension but closed for modification. We should write a code that does not require modification every time a customer changes its request. Example Let us define a class that contains salary calculations. Let us imagine that we have a task where we need to calculate the total cost of all the developer salaries in a single company. To get started, we are going to create the model class first, public class EmployeeReport { public int Id { get ; set ; } public string Name { get ; set ; } public string Level { get ; set ; } public int WorkingHours { get ; set ; } public double HourlyRate { get ; ...

Liskov Substitution Principle

Liskov Substitution Principle We will be discussing the Liskov Substitution Principle also known as LSP, as one of the SOLID principles of object-oriented programming and how to implement it when designing our software. This principle said that Subtypes must be substitutable for their base types. In other words, if we substitute a superclass object reference with an object of any of its subclasses, the program should not break. Example Here we design three classes for employees and one abstract class and Implement abstract class on these classes, PermamentEmployee.cs ContractEmployee.cs TemporaryEmployee.cs class LSP { public LSP ( ) { Run ( ) ; } public void Run ( ) { Console . ReadLine ( ) ; } public abstract class Employee { protected string FullName { get ; set ; } protected abstract string CalculateBonus ( ) ; } public class PermamentEmployee : Employee ...