In this article we can have a quick introduction of asp.net core 1.0 and can have an overview of its features. In my subsequent articles, I’ll brief you with examples.
What is Asp.net Core 1.0
Asp.net core is a redesign of Asp.net. It is open source platform to develop the modern internet application. It can execute on the .Net core or full .Net framework. It can be deployed in cloud or on premises. It no longer uses the System.Web.dll.
· .Net is a subset of the .Net Framework
· Modular based, components are distributed via NuGet
· Cross platform it can deployed and published in MAC, windows and Linux
· The apps can be updated independently
· Open Source
· Performance improvement
· Dependency Injection
· StartUp.cs is used to declare the services as a dependency.
· Unified Framework (MVC and WEBAPI unified into a single package)
Asp.net core includes the web server Kestrel. The kestrel is a cross platform web server and it runs on the top of libuv, cross platform asynchronous I/O library. The kestrel is good to run when the application used for the internal project, else it is recommend to use the reverse proxy with the some other web server like IIS, Apache, etc. The request helps us in security and the handle the traffic from internet. Kestrel is new and doesn’t have full complement of defences against attacks
The components assembled into application pipeline to handle the request and response. The request delegates use to build the request pipeline.
The request delegates configuration using three extension method such as Run, Map and Use, which is the interface called IApplicationBuilder which is executed in the startUp.cs and uses the method Configure.
The request can be specified through an anonymous method or through a custom Class. The custom class can be called as middleware or middleware component. The middleware component in the request pipeline is responsible for invoking the next component in the pipeline.
The run method will return to the http response immediately without calling the next pipeline. It is recommend using the last http pipeline
It will insert the next middleware into the pipeline which requires you to call the next middleware by calling the method next.Invoke(context).
The Map extension method is used to match request delegates based on a request's path. It accepts a path and function that configure a separate middleware pipeline.
Authentication, Cors, Response Caching, Response Compression, Routing, Session, Static Files, URL Rewriting