Note: This project is a non-commercial application based on authors personal interests of technologies.
This project represents application that is responsible for handling users and related to them entities.
- C# 13;
- ASP.Net 9.0 WebAPI;
- Entity Framework;
- Identity Server Core;
- Handlebars;
- Automapper;
- MailKit;
- HealthChecks UI;
- NUnit;
- Open Telemetry;
Before launching this application make sure you have prepared the following components:
- Windows | macOS | Linux;
- MSSQL;
- .Net 9 SDK;
- Visual Studio | Visual Studio Code | Rider;
- SSMS | DBeaver | DataGrip;
- Docker | Rancher Desktop | Podman - Optional;
- Clone repository:
git clone https://github.com/dotnet-fizzyy/ASP.Net-Identity.git
- Execute the following command to configure git hooks for repository:
git config --local core.hooksPath .githooks/. If you use Linux/MacOS, make sure you have enough permissions to run hooks, execute the following command:sudo chmod +x .githooks/*. - Run DY.Auth.Identity.Api.sln in the root directory;
- Depending on your OS, choose IIS or Kestrel as hosting webserver;
- Make sure your MSSQL database instance is running. Otherwise you will not be able to launch app;
- Start the application;
- Visit the following URL:
https://localhost:{port}/swagger. You should be able to see Swagger description;
Docker is not necessary to launch application if you have prepared prerequisites for your physical OS. If you want to launch it without and modifications and would like to see the working result, you can refer to the next steps:
- Follow the first step from previous article;
- Switch open project root directory via terminal;
- Run the following command:
docker-compose -f docker-compose.app.yml -f docker-compose.infrastructure.yml up --build - Wait until corresponding images will be downloaded, all steps from Dockerfile will pass and application will start;
- Visit the following URL: http://localhost:13501/swagger. You should be able to see Swagger description;
- If you need to stop Docker containers, you can just press
ctrl + Ckeyboard combination in your terminal and wait until containers will be stopped. To terminate containers, enter (or stop via Docker dashboard):docker-compose down - To remove application images, enter the following command (or remove via Docker dashboard):
docker rmi mcr.microsoft.com/mssql/server identitywebapi nginx jaegertracing/all-in-one
Application does not write logs to files, it display logs in terminal in the following ways:
- Local run via IDE;
- Docker;
Application supports tracing with help of Open Telemetry framework. In order to view traces you can use Jaeger UI tool provided in docker-compose.yml or set up it on your host. To be able to view traces after running application and Jaeger UI enter http://localhost:16686 URL in browser.
For more examples, please, refer to the following options:
dotnet-fizzyy | GitHub | [email protected]