---
title: Save a web context remotely
summary: Persist a web context to the remote WCF service on cross-application navigation.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-09-17
library: SAIF.Framework.Web.Mvc
reference_type: package
operation_id: OP-06
trigger: OP-07 (navigate between applications and views) step 3 (cross-application navigation)
---

# Save a web context remotely

Persist a web context to the remote WCF service on cross-application navigation. Trigger: OP-07 (navigate between applications and views) step 3 (cross-application navigation).

| Field | Value |
| --- | --- |
| **Operation ID** | OP-06 |
| **Trigger** | OP-07 (navigate between applications and views) step 3 (cross-application navigation) |
| **Inputs** | `applicationName`, `sessionId`, `context` |
| **Outputs** | Remote persistence; no return value |
| **Primary components** | `WebContextService.Save(string applicationName, string sessionId, IWebContext context)` |
| **Entry point** | `src/Web/WebContextService.cs` |

## Steps

1. `Enforce.ArgumentNotNullOrEmpty(applicationName)`, `Enforce.ArgumentNotNullOrEmpty(sessionId)`, `Enforce.ArgumentNotNull(context)` ([BR-01](../business-rules.md#br-01-guarded-arguments-reject-null-or-empty-input)).
2. Open a `WebContextServiceClient` (`using`) and call `Channel.Save(applicationName, sessionId, context)`.**
3. No session-cache write occurs on save.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Cross-application navigation])
	Guard[Guard arguments]
	Open[Open WebContextServiceClient]
	Call[Channel.Save]
	EndOk([Return])
	Start --> Guard
	Guard --> Open
	Open --> Call
	Call --> 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
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

> **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`
