3.4 KiB
3.4 KiB
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
- Overview
- Prerequisites
- Project structure
- Configuration (
Web.config) - Database setup
- Build & run instructions
- Deployment notes
- Troubleshooting
- 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 <connectionStrings>:
- Production (default active)
<add name="Vecv_Tracking" connectionString="Server=127.0.0.1;Port=5432;User Id=;Password=;Database=eos_secound_release_tracking_uat;" /> <add name="Vecv_GoData" connectionString="Server=127.0.0.1;Port=5432;User Id=;Password=;Database=eos;CommandTimeout=2000;" /> - QA / UAT (commented out for switching)
⚠️ Replace
User IdandPasswordwith actual credentials before deployment.
Entity Framework
Configured for EF6 via <entityFramework> section.
Used to manage migrations and database interactions with PostgreSQL.
DotNetOpenAuth
Sections included for:
- OAuth
- OpenID
- Messaging & reporting
5. Database setup
- Install PostgreSQL (v12+).
- Create required databases:
eos(main data).eos_tracking(tracking data).
- Apply schema SQL scripts (see EOS database README).
- Update
Web.configconnection strings with correct credentials.
6. Build & run instructions
- Open
EOSWebAPI.slnin Visual Studio. - Restore NuGet packages.
- Build solution (
Ctrl+Shift+B). - Run with IIS Express or configure IIS for hosting.
- 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
CommandTimeoutin connection strings. - Entity Framework migrations → run:
Update-Database -Verbose
9. Contact / maintainers
- Maintainer: (team/person name, email)
- Project: EOSWebAPI