Skip to content

Host startup

BolRazorLayoutStartup is the base class a consumer application inherits for its startup. It builds on OidcRazorStartup from the platform packages and adds the BOL specific configuration.

Field Value
Operation ID OP-02
Trigger Consumer startup inheriting BolRazorLayoutStartup
Inputs IConfiguration, the BasicAppMap configuration section
Outputs Registered BOL services and bound IOptions<BasicAppMap>
Primary components BolRazorLayoutStartup.ConfigureServices, BolRazorLayoutStartup.Configure
Entry point src/BolMiddleware/BolRazorLayoutStartup.cs

Steps

  1. The constructor stores the supplied IConfiguration and calls the base constructor.
  2. ConfigureServices sets EnableLegacyBolAuthMiddleware to true so the base startup adds the legacy BOL authentication middleware.
  3. It calls the base ConfigureServices to register OIDC authentication and platform services.
  4. It calls Register BOL services.
  5. It binds the BasicAppMap configuration section to IOptions<BasicAppMap> and registers a scoped IAppMap that resolves a default BasicAppMap instance.
  6. Configure only calls the base implementation; the resulting middleware order is unknown**.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Startup]) --> S1[Enable legacy BOL auth middleware]
    S1 --> S2[Base ConfigureServices]
    S2 --> S3[Register BOL services]
    S3 --> S4[Bind BasicAppMap options]
    S4 --> S5[Register scoped IAppMap]
    S5 --> EndOk([Configure calls base])

Failure and edge-case behavior

  • IAppMap resolves an unbound default BasicAppMap, while views read the bound IOptions<BasicAppMap>; code that injects IAppMap sees empty values.
  • BolLayoutStartup.cs is entirely commented out; it is dead code and has no effect.

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • src/BolMiddleware/BolRazorLayoutStartup.cs
  • src/BolMiddleware/BolLayoutStartup.cs
  • src/BolMiddleware/Models/MenuModels/BasicAppMap.cs