Skip to content

Get a web context by application and session

Retrieve the context associated with a referring application and session, always from the remote service. Trigger: OP-01 (resolve web context) step 5 (cross-application arrival).

Field Value
Operation ID OP-05
Trigger OP-01 (resolve web context) step 5 (cross-application arrival)
Inputs applicationName, sessionId
Outputs IWebContext
Primary components WebContextService.Get(string applicationName, string sessionId)
Entry point src/Web/WebContextService.cs

Steps

  1. Enforce.ArgumentNotNullOrEmpty on both applicationName and sessionId (BR-01).
  2. Open a WebContextServiceClient at serviceUrl (using block).
  3. Call Channel.Get(applicationName, sessionId) on the remote WCF service.**
  4. items.UpdateOrAdd(context.ContextId, context) — cache in session (BR-09).
  5. Return the context. This path always contacts the remote service; it does not consult the session cache first.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Cross-application arrival])
    Guard[Guard applicationName/sessionId]
    Open[Open WebContextServiceClient]
    Call["Channel.Get app,session"]
    Cache[Cache in session]
    EndOk([Return context])
    Start --> Guard
    Guard --> Open
    Open --> Call
    Call --> Cache
    Cache --> EndOk

Failure and edge-case behavior

  • No unexpected failure paths beyond argument-guard exceptions and delegated dependency behavior were identified for this operation.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • src/Web/WebContextService.cs