Let's talk about two important use cases of authorizing APIs basing on an user role defined by the system and authorizing a user basing on an incoming request claims from the user token. While these two may seem to be of different in their functionalities and usage cases, they both branch out from the Policy based authorization that the ASP.NET Core provides us with.
Let's look at how we can introduce dependency injection in a dotnetcore console application using the same DI container provided with an aspnetcore web application.
For production grade application systems, we go to third-party caching providers which are specialized at high-performance and highly efficient caching solutions. There are two such popular caches which are widely used by application developers in the production realm - Redis and Memcached.
Logging is one of those most essential components to build in an application, which can later help us in quick troubleshooting in case the application runs into any issues during runtime. In this article, let's talk about how we can configure and implement Log4net file logging in an AspNetCore application in a simple way.
Dependency Injection is one of the most important and interesting features of .NET Core, which simplifies the way dependencies for any component are instantiated and maintained for use - called as "services".
So far we have seen how to fetch an aspnetcore codebase from a Git repository, how to automate the build of the fetched codebase and generate build artifacts. In this article we shall look at how we can automate executing test scripts on our fetched codebase after a build and generate a report out of it.
Let's dig into securing our APIs by means of Authenticating incoming requests based on an access token. Let's also look at how we can write our own token generation provider using the asp.net core library.
AspNetCore supports deploying and running applications on Windows, Linux and MacOS environments as well by means of a hosting bundle provided by AspNetCore. This hosting bundle provides the necessary runtime for the application to run without any issues; be it a Linux, Mac or a Windows environment.
EF Core provides nuget package libraries for developers to connect and work with other database providers such as MySQL, Oracle or PostgreSQL apart from SQL Server.
When an AspNetCore application starts up for execution, the first method to be called is the main() method inside the Program.cs file. Inside the main() method, an AspNetCore application builds a "Host" and invokes Run() method on it.