Skip to content

WebContextService

WebContextService implements the external IWebContextService contract and is activated over the WebContext route. This page documents every public operation the class exposes.

Field Value
Service class SAIF.Services.WCF.Services.WebContextService
Declared contract IWebContextService — external (SAIF.Services.WCF.Contracts, arriving transitively via SAIF.Framework.Core) *
Route WebContext
Source src/WCF/SAIF.Services.WCF.Host/Services/WebContextService.cs
Service attributes [AspNetCompatibilityRequirements(RequirementsMode = Allowed)], [LogErrorBehavior]
Instancing / concurrency WCF defaults — not overridden in source
Binding basicHttpBinding (default, unnamed — no <endpoint> is configured for any of the six routes)
Class-level authorization None in code
Error handling [LogErrorBehavior] installs ErrorLogErrorHandler; see Faults and error pipeline
Operations 3
Also hosted in —

Get

Retrieve and consume a stored web context.

Field Value
Operation name Get
Contract name Get — override, if any, not observable because IWebContextService is declared in an external contracts assembly
SOAP action Not observable — contract assembly is external
Implementing member SAIF.Services.WCF.Services.WebContextService.Get (src/WCF/SAIF.Services.WCF.Host/Services/WebContextService.cs)
Pattern Request/response (IsOneWay not observable — contract assembly is external)
Binding basicHttpBinding (default, unnamed)
Authorization None in code
Process OP-009

Get input message

Part Type Required Default Purpose
applicationName string Yes — Application name portion of the context key.
sessionId string Yes — Session id portion of the context key.

Get output message

Field Value
Return type IWebContext
Meaning The web context for the given application and session, then destroyed.
Empty-result behavior A newly-created context with a fresh GUID id when no __SAIFPID item is stored.

Get faults

Fault Declared Raised when Surfaced as Detail crosses the boundary
ArgumentNullException Not declared See OP-009 process detail Generic SOAP fault produced by The operation itself, via Enforce Yes
SQL Server/NHibernate exception Not declared See OP-009 process detail Generic SOAP fault produced by The ErrorLogErrorHandler installed by [LogErrorBehavior] Yes

Get authorization

None in code. Access to Get rests entirely on the IIS authentication configured for the deployment variant; see Authentication and authorization.

Get side effects

Aspect Finding
Records written WebContextItem (read, then deleted)
Downstream calls None
Files or messages produced Deletes every WebContextItem row read for the application/session
Shared state touched None
Repeat-call behavior A repeat call after a successful Get returns a fresh context because the rows were deleted

Save

Replace the stored web context for an application and session.

Field Value
Operation name Save
Contract name Save — override, if any, not observable because IWebContextService is declared in an external contracts assembly
SOAP action Not observable — contract assembly is external
Implementing member SAIF.Services.WCF.Services.WebContextService.Save (src/WCF/SAIF.Services.WCF.Host/Services/WebContextService.cs)
Pattern Request/response (IsOneWay not observable — contract assembly is external)
Binding basicHttpBinding (default, unnamed)
Authorization None in code
Process OP-010

Save input message

Part Type Required Default Purpose
applicationName string Yes — Application name portion of the context key.
sessionId string Yes — Session id portion of the context key.
context IWebContext Yes — The context whose entries are persisted.

Complex input types

Type Kind Members Declared in
IWebContext Data contract Not enumerated — declared in an external contracts assembly ** SAIF.Services.WCF.Contracts / framework closure *

Save output message

Field Value
Return type void
Meaning A successful response indicates only that the operation completed without a fault.
Empty-result behavior Not applicable.

Save faults

Fault Declared Raised when Surfaced as Detail crosses the boundary
ArgumentNullException Not declared See OP-010 process detail Generic SOAP fault produced by The operation itself, via Enforce Yes
SQL Server/NHibernate exception Not declared See OP-010 process detail Generic SOAP fault produced by The ErrorLogErrorHandler installed by [LogErrorBehavior] Yes

Save authorization

None in code. Access to Save rests entirely on the IIS authentication configured for the deployment variant; see Authentication and authorization.

Save side effects

Aspect Finding
Records written WebContextItem (delete all, then insert)
Downstream calls None
Files or messages produced Deletes and reinserts the full WebContextItem set for the application/session
Shared state touched None
Repeat-call behavior Idempotent — replaces the full stored set each time

CreateContext

Construct a new in-memory web context.

Field Value
Operation name CreateContext
Contract name CreateContext — override, if any, not observable because IWebContextService is declared in an external contracts assembly
SOAP action Not observable — contract assembly is external
Implementing member SAIF.Services.WCF.Services.WebContextService.CreateContext (src/WCF/SAIF.Services.WCF.Host/Services/WebContextService.cs)
Pattern Request/response (IsOneWay not observable — contract assembly is external)
Binding basicHttpBinding (default, unnamed)
Authorization None in code
Process OP-011

CreateContext input message

Part Type Required Default Purpose
contextId string No — Seed value for the new context's id; a blank value produces a fresh GUID instead.

CreateContext output message

Field Value
Return type IWebContext
Meaning A new, unpersisted web context carrying the given or generated id.
Empty-result behavior Not applicable.

CreateContext faults

Fault Declared Raised when Surfaced as Detail crosses the boundary
— Not declared — — —

CreateContext authorization

None in code. Access to CreateContext rests entirely on the IIS authentication configured for the deployment variant; see Authentication and authorization.

CreateContext side effects

Aspect Finding
Records written None
Downstream calls None
Files or messages produced None — no persistence occurs
Shared state touched None
Repeat-call behavior Idempotent when contextId is supplied; produces a new id each call otherwise

Coverage checklist

Public member Documented section Pattern
IWebContext Get(string applicationName, string sessionId) Get Request/response
void Save(string applicationName, string sessionId, IWebContext context) Save Request/response
IWebContext CreateContext(string contextId) CreateContext Request/response

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/WCF/SAIF.Services.WCF.Host/Services/WebContextService.cs