Posts

.NET Web API with Elastic Search and Kibana

Image
 ElasticSearch Elasticsearch is a search engine based on the Lucene library. It provides a distributes, multitenany-capable full-test search engine with an HTTP web interface and schema-free JSON documents. Kibana Kibana is a source-available data visualization dashboard software for Elasticsearch. Adding elastic search and kibana to the web API solution is a very simple tasks and it needs only a library to be installed and few configuration changes. Install Serilog.AspNetCore and Serilog.Sinks.Elasticsearch packages from nuget packkage manager in Visual Studio. Serilog.AspNetCore package helps to manage and show the logs using serilog and Serilog.Sinks.Elasticsearch connects with the elasticsearch instance and loads the logs into the elasticsearch. Next is to change the configurations to add elasticsearch to the API code. In the Program.cs file add the below lines to configure elasticsearch with serilog. Now the configurations fo...

Docker with .NET 6.0 Web API

Image
  Create Docker Images with .NET 6.0 Web API   Docker is a software platform that facilitates the rapid development, testing, and deployment of programs. Docker software bundles programs into uniform units known as containers, each of which contains the libraries, runtime, code, and system tools required for the program to function.   Through this let us learn to create an image with a C# Web API running on .NET 6.0 and containerize the image and launch the docker running application.   Steps   Download docker desktop from this link   Install Docker desktop in the host machine   Sign in with an account   Create a Web Api application and add required controllers and services for the Api.   Now right click on the main project and select add, in there select ‘Docker Support’     After adding docker support, a file called ‘ Dockerfile ’ will be created in the directory, open the file and there will be few configurations present as ...