Posts

Showing posts from January, 2020

Featured post

Logging in ASP.NET Core 3.1 Using NLog

Image
  NLog          NLog is an open source logging framework that provides a great flexibility and configurable options to log the insights of your application. It allows to select multiple targets like database, files, console, etc. at the same time so that user don’t have to maintain different configurations in code. This is the most widely used logging framework out there.  For more details :  https://nlog-project.org/    It is easy to implement in your Asp.Net core application. We'll see step by step with image.    1.     Open Visual Studio and Create new project 2.    Choose ASP.Net Core Web Application 3. Enter Name of project 4.  Choose Web Application  5.  Right Click on your project name and choose Manage Nudget packages.         Search these two nudget packages and install.            1. NLog.Config         2. NLog.Web.AspNetCore                   6.  Open Nlog.config file and paste the code.   <?xml version= "1.0" encoding= "utf-8" ?> < nlog

Indexing and Searching Elasticsearch 6.3.1 | 2020

Image
  1. Download Elasticsearch 6.3.1 from link below    https://www.elastic.co/downloads/past-releases/elasticsearch-6-3-1 2. Download Kibana 6.3.1 from link below  https://www.elastic.co/downloads/past-releases/kibana-6-3-1 3. for start elastic in your pc double click on elasticsearch.bat    -  Go your download destination where you download elastic zip file and extract zip   -  Go to bin folder there is bat file 4. for start kibana in your pc double click on kibana.bat   -  Go your download destination where you download kibana zip file and extract zip   -  Go to bin folder there is bat file 5. Open browser and type    - http://localhost:9200   for elasticsearch    - http://localhost:5601   for kibana dashboard 6. Go to kibana  dashboard and go to dev tools 7. In dev console you can create index,add docs and searching. 8. Check the Code below // Create Index PUT test {   "settings": {     "blocks.read_o