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¶
Enforce.ArgumentNotNullOrEmptyon bothapplicationNameandsessionId(BR-01).- Open a
WebContextServiceClientatserviceUrl(usingblock). - Call
Channel.Get(applicationName, sessionId)on the remote WCF service.** items.UpdateOrAdd(context.ContextId, context)— cache in session (BR-09).- 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.
Related documentation¶
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