HI WELCOME TO KANSIRIS
Showing posts with label asp.net core. Show all posts
Showing posts with label asp.net core. Show all posts

Target Multiple Frameworks in .NET Core 2.x App

Leave a Comment
As mentioned in the previous chapter, creating a .NET Core application which targets multiple frameworks is one of the approaches for code sharing. We can create .NET Core application and configure multiple target frameworks for it so that it can run with all the configured target frameworks. To demonstrate this, let's create .NET Core 2.0 console application which can run with .NET Core as well as traditional .NET framework in Visual.

Code Sharing in .NET Core

Leave a Comment
With .NET Core, we can currently develop applications with three different .NET frameworks for different platforms. The traditional or standard .NET Framework is for Windows, Mono framework for iOS, OSx and Android and .NET Core for Windows, Mac and Linux. .NET Frameworks These frameworks use different framework class libraries. It means code written in one framework cannot be used with other frameworks. For example, a console application.

.NET Core Application Types

Leave a Comment
We can create two types of applications in .NET Core. Portable Application Self-contained application Portable Application Portable applications are applications which expect .NET Core runtime on the deployment machines. It cannot be run on a machine which does not have .NET Core runtime installed. .NET Core Portable Application Self-contained Application Self-contained applications are applications which include .NET Core runtime.

ASP.NET Core - Serving Static Files

Leave a Comment
Here, we will learn how to serve static files such as html, JavaScript, CSS, or image files on HTTP request without any server-side processing. ASP.NET Core application cannot serve static files by default. We must include Microsoft.AspNetCore.StaticFiles middleware in the request pipeline. Install StaticFiles Middleware The Microsoft.AspNetCore.StaticFiles middleware package is already included in the meta package Microsoft.AspNetCore.All,.

ASP.NET Core - Exception Handling

Leave a Comment
Exception handling is one of the most important features of any application. Fortunately, ASP.NET Core includes a middleware that makes exception handling easy. In this chapter, we will learn about exception handling in ASP.NET Core application. By default, ASP.NET Core returns a simple status code for any exception that occurs in an application. Consider the following example of Configure method which throws an error. public class.