Prerequisites
Before starting, ensure you have the following:- .NET 9.0 SDK or higher installed
- INFOR EAM Web Services access credentials (username, password, organization)
- INFOR EAM SOAP endpoint URL
- Basic understanding of ASP.NET Core applications
- (Optional) IIS for production deployment
Verify .NET Installation
Environment Setup
1. Clone and Restore Dependencies
First, clone the repository and restore all NuGet packages:2. Project Structure
The solution consists of three main projects:3. Key Dependencies
The main project includes these essential packages:- AspNetCore.Authentication.Basic (9.0.0) - Basic authentication
- Microsoft.EntityFrameworkCore.Sqlite (9.0.0) - Grid caching
- Scalar.AspNetCore (2.11.0) - API documentation
- Mediator.SourceGenerator (3.0.1) - CQRS pattern
- Serilog - Structured logging
- Polly (8.5.0) - Resilience policies
Database Configuration
SQLite Grid Cache
The application uses SQLite for caching EAM grid data. The database is automatically created on first run. Default location:gridcache.db in the application root directory
The cache database is created automatically during application startup:
HGT.EAM.WebServices/Setup/Startup.cs
Connection String Configuration
Inappsettings.json, configure the SQLite connection:
The SQLite database includes a 30-second busy timeout to handle concurrent requests during cold starts. This is configured automatically in
ServiceCollectionExtensions.cs.INFOR EAM Connection Setup
Configure EAM Base URL
Set the INFOR EAM Web Services SOAP endpoint:appsettings.json
Configure EAM Credentials
Add one or more EAM user credentials in theEAMCredentials array:
appsettings.json
Configure EAM Grids
Define the EAM grids you want to expose through the API:appsettings.json
Grid Configuration Properties
Grid Configuration Properties
- GridName: EAM grid identifier
- UserFunction: EAM user function code
- GridId: Numeric grid identifier from EAM
- DataSpyIds: DataSpy IDs for different time filters
- NumberRecordsFirstReturned: Initial fetch size
- CursorPosition: Starting cursor position
- HGTGridType: Grid type enum value
- HGTGridName: Grid name enum value
- FilterField: Field used for filtering
Running in Development
Using .NET CLI
Run the application directly:Using Launch Profiles
The project includes two launch profiles inlaunchSettings.json:
HGT.EAM.WebServices/Properties/launchSettings.json
Access the API Documentation
Once running, navigate to:- Scalar Documentation:
https://localhost:7092/scalar - OpenAPI JSON:
https://localhost:7092/openapi/v1.json
Running in Production
Building for Production
Create a production build:Environment-Specific Configuration
Create environment-specific configuration files:appsettings.Development.json- Development settingsappsettings.Stage.json- Staging settingsappsettings.Production.json- Production settings
appsettings.json based on the ASPNETCORE_ENVIRONMENT variable.
IIS Deployment
The project includes aweb.config for IIS deployment:
HGT.EAM.WebServices/web.config
- requestTimeout: 30 minutes (handles large EAM grid fetches)
- hostingModel: In-process for better performance
- urlCompression: Enabled for JSON response compression
Deploying to IIS
-
Build and publish the application:
-
Create an IIS Application Pool with:
- .NET CLR Version: No Managed Code
- Managed Pipeline Mode: Integrated
- Create an IIS Site pointing to the publish directory
- Set the environment variable in IIS or web.config
-
Grant permissions to the IIS user for:
- Application directory
gridcache.dblocationlogs/directory
Production Environment Variables
Set these environment variables in production:Verification
Health Check
Verify the application is running:Test Authentication
Test Basic Authentication:Verify Cache Creation
Check that the SQLite cache database was created:Troubleshooting
Issue: “EAMCredentials configuration section is missing”
Cause: TheEAMCredentials array is not configured in appsettings.json.
Solution: Add at least one credential entry as shown in the INFOR EAM Connection Setup section.
Issue: “EAMGrids configuration section is missing or empty”
Cause: No grids are configured in theEAMGrids array.
Solution: Add grid configurations as shown in the Configure EAM Grids section.
Issue: Database Lock Errors
Cause: Multiple concurrent requests trying to initialize the SQLite database. Solution: The application includes automatic retry logic with a 30-second busy timeout. If issues persist, ensure only one application instance is initializing the database.Issue: Cannot Connect to EAM Web Services
Cause: IncorrectEAMBaseUrl or network connectivity issues.
Solution:
- Verify the EAM endpoint URL
- Test connectivity:
curl https://your-eam-server/axis/services - Check firewall rules
- Verify EAM credentials are correct
Issue: Rate Limit (429) Responses
Cause: Exceeded 60 requests per minute per user/IP. Solution: See the Rate Limiting Guide for details on handling rate limits.Next Steps
Configuration Reference
Detailed reference for all configuration options
Rate Limiting
Understanding and working with rate limits
API Reference
Explore available API endpoints
Architecture
Understand the system architecture