---
title: IWebEnvironmentService
summary: API reference for IWebEnvironmentService.
status: draft
owner: <owner>
last_reviewed: 2026-07-23
library: SAIF.Framework.Security.EnvironmentApi
reference_type: package
---

# IWebEnvironmentService

`IWebEnvironmentService` is a small contract describing the host/client-context properties needed to determine a request's origin and environment. It is implemented by `WebEnvironmentService`.

## Purpose
- Define the minimal set of host/client-context properties needed to classify a request's environment and origin, independent of the broader `IEnvironmentService` configuration-retrieval surface.

## Context
- Namespace: `SAIF.Framework.Security`
- Assembly/package: `SAIF.Framework.Security.EnvironmentApi`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| MachineName | `string MachineName { get; }` | The current machine's name. |
| ApplicationHost | `string ApplicationHost { get; }` | Host-specific resolution of the application host name. |
| IsClientExternal | `bool IsClientExternal { get; }` | Indicates whether the current client request originates from outside the internal network. |
| IsClientInsideFirewall | `bool IsClientInsideFirewall { get; }` | Indicates whether the current client request originates from inside the firewall. |
| IsLocalMachine | `bool IsLocalMachine { get; }` | Indicates whether the current host is the local machine for the hosting context. |
| IsWeb | `bool IsWeb { get; }` | Indicates whether the hosting context is a web application. |
| User | `IPrincipal User { get; }` | The already-authenticated principal for the current request/thread. |

## Behavioral notes
- This interface's member set is a strict subset of `IEnvironmentService`'s host/client-context properties; `WebEnvironmentService` implements both `IEnvironmentService` (via `EnvironmentServiceBase`) and this interface*.
- No consumer within this library references `IWebEnvironmentService` as a standalone type by name*; it appears to exist for downstream consumers that only need host/client-context information without the full configuration-retrieval contract*.

## Constraints and usage notes
- Consumers that only need host/client-context classification (and not configuration retrieval) can depend on this narrower interface instead of the full `IEnvironmentService`.

> **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
- SAIF.Framework.Security.EnvironmentApi\Services.Common\IWebEnvironmentService.cs
- SAIF.Framework.Security.EnvironmentApi\Services.Common\WebEnvironmentService.cs
