SAIF.Premium.Api is an ASP.NET Core 8 Web API hosted in-process by IIS through
the ASP.NET Core Module V2. Program.cs uses the minimal host
(WebApplication.CreateBuilder) but hands service and middleware configuration
to a Startup type derived from the SAIF CoreAPIStartup base class, so the
pipeline is a mix of calls the repository makes and contributions the base class
makes that source does not show. A request passes the base class's opaque
ConfigureMiddleware step, Swagger, and the base class's opaque Configure
step before it reaches a controller action or the one minimal API group. API
versioning is read from the URL segment, so v1 and v2 are part of the route.
The repository uses both host styles: the host is a minimal host, and
Program.cs calls the Startup methods itself rather than through
UseStartup<Startup>(). Startup.ConfigureServices calls
base.ConfigureServices(services) as its first statement, before any local
registration. Startup declares no ConfigureMiddleware method;
startup.ConfigureMiddleware(app) resolves to a method that exists only on
CoreAPIStartup, so what it registers is not visible in source.
Enables the secure IEnvironmentClient, which decrypts secure settings; the registration itself is opaque, contributed by SAIF.NetCore.ServiceExtensions†
EnableNewtonsoftJsonSerializer
Not set
-
The base class's default serializer stays in effect†
DisableAuthServices
Not set
-
The base class's authentication and authorization services stay registered; their configuration is opaque†
WebHostEnvironment.EnvironmentName
Configuration["AppSettings:ApplicationHost"]
src/SAIF.Premium.Api/Startup.cs:23
The environment name comes from appsettings.json, not from ASPNETCORE_ENVIRONMENT
web.config<aspNetCore ... hostingModel="InProcess"> and <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> in src/SAIF.Premium.Api/SAIF.Premium.Api.csproj
web.config notes
The checked-in arguments value still references bin\Debug\net6.0\SAIF.Premium.Api.dll while the target framework is net8.0; recorded in Tech debt
Local launch profiles
Properties\launchSettings.json - profiles SAIF.Premium.Api (Project) and IIS Express, both with launchUrl = swagger (local development only)
Declared only on CoreAPIStartup (SAIF.NetCore.ServiceExtensions)† - not visible in source; runs before Startup.Configure
2
app.UseHttpsRedirection()
src/SAIF.Premium.Api/Startup.cs:50
-
Commented out
Disabled in source, so this service applies no HTTPS redirection of its own
3
app.UseSwagger()
src/SAIF.Premium.Api/Startup.cs:51
Always
Active
Not gated by environment; the OpenAPI documents are served on every track
4
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Premium API v1"); c.SwaggerEndpoint("/swagger/v2/swagger.json", "Premium API v2"); })
src/SAIF.Premium.Api/Startup.cs:52
Always
Active
One endpoint per declared API version
5
base.Configure(app, env)
src/SAIF.Premium.Api/Startup.cs:57
Always
Opaque
Contributed by CoreAPIStartup (SAIF.NetCore.ServiceExtensions)† - not visible in source. Controller endpoint mapping happens inside this call; the relative order of routing, authentication and authorization is not visible in source
[ApiVersion("1.0")] on PremiumsController; [ApiVersion("1.0")] and [ApiVersion("2.0")] on ClassCodesController; AdminController and the RateTableEndpoints group declare no version and use a literal v1 route prefix
Note: Statements marked with † were retrieved from dependency library documentation
via the Legends CLI RAG service. They describe inherited behavior from the indicated
origin library and should be verified if the dependency version changes.