From b19da63a8651373033e8c173d4354e2653c0df8b Mon Sep 17 00:00:00 2001 From: nbhargava Date: Tue, 16 Sep 2025 16:49:49 +0000 Subject: [PATCH] Upload files to "/" --- README.md | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/README.md b/README.md index e69de29..32f153f 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,115 @@ +# README — **EOSWebAPI** (.NET Web API Project) + +This README provides setup and configuration details for the **EOSWebAPI** project. The application is an ASP.NET Web API project backed by PostgreSQL databases, using Entity Framework and DotNetOpenAuth for authentication support. + +--- + +## Table of contents +1. Overview +2. Prerequisites +3. Project structure +4. Configuration (`Web.config`) +5. Database setup +6. Build & run instructions +7. Deployment notes +8. Troubleshooting +9. Contact / maintainers + +--- + +# 1. Overview +**EOSWebAPI** is a Web API project designed to expose services for the EOS platform. +It includes: +- **ASP.NET Web API** backend. +- **Entity Framework 6** ORM. +- **PostgreSQL databases** (`eos`, `eos_tracking`, etc.). +- **OAuth/OpenID support** (DotNetOpenAuth). + +--- + +# 2. Prerequisites +- **.NET Framework 4.6+** (Web.config targets ASP.NET Web API). +- **Visual Studio** (2019 or later recommended). +- **PostgreSQL** (v12 or higher). +- **NuGet packages**: EntityFramework, Npgsql (PostgreSQL driver), DotNetOpenAuth. + +--- + +# 3. Project structure +Typical key folders: +- `Controllers/` → API endpoints. +- `Models/` → Entity Framework models. +- `App_Start/` → Route config, filters, dependency injection. +- `Web.config` → Core configuration file (DB connections, EF, authentication). + +--- + +# 4. Configuration (`Web.config`) + +### Connection Strings +Defined in ``: +- **Production (default active)** + ```xml + + + ``` +- **QA / UAT** (commented out for switching) + +> ⚠️ Replace `User Id` and `Password` with actual credentials before deployment. + +### Entity Framework +Configured for EF6 via `` section. +Used to manage migrations and database interactions with PostgreSQL. + +### DotNetOpenAuth +Sections included for: +- OAuth +- OpenID +- Messaging & reporting + +--- + +# 5. Database setup +1. Install PostgreSQL (v12+). +2. Create required databases: + - `eos` (main data). + - `eos_tracking` (tracking data). +3. Apply schema SQL scripts (see EOS database README). +4. Update `Web.config` connection strings with correct credentials. + +--- + +# 6. Build & run instructions +1. Open `EOSWebAPI.sln` in Visual Studio. +2. Restore NuGet packages. +3. Build solution (`Ctrl+Shift+B`). +4. Run with IIS Express or configure IIS for hosting. +5. API should be accessible at: + ``` + https://localhost:xxxx/api/{controller}/{action} + ``` + +--- + +# 7. Deployment notes +- Deploy to IIS / Windows Server. +- Ensure correct environment connection strings are **uncommented** in `Web.config`. +- Use `web.config transforms` (`Web.Release.config`, `Web.Debug.config`) for automated switching between environments. +- Configure logging (Serilog/NLog recommended). + +--- + +# 8. Troubleshooting +- **Login/auth issues** → check DotNetOpenAuth sections & OAuth client setup. +- **DB connection errors** → validate `Server`, `Port`, `Database`, `User Id`, `Password`. +- **Timeouts** → adjust `CommandTimeout` in connection strings. +- **Entity Framework migrations** → run: + ```powershell + Update-Database -Verbose + ``` + +--- + +# 9. Contact / maintainers +- Maintainer: (team/person name, email) +- Project: **EOSWebAPI**