# Microsoft.AspNetCore.Server.IISIntegration

**Kind:** Service

**Source:** `Pams/Web/Pams.Web/Pams.Web.csproj` (line 1)

**Part of:** [Pams](subsystem-pams)

NuGet package dependency

`Microsoft.AspNetCore.Server.IISIntegration` is a NuGet package dependency in `Pams.Web.csproj` for hosting the ASP.NET Core application behind IIS. It connects IIS request handling to the ASP.NET Core request pipeline when the application runs in an IIS environment.

## Diagram

```mermaid
sequenceDiagram
    participant Client
    participant IIS
    participant IISIntegration as Microsoft.AspNetCore.Server.IISIntegration
    participant PamsWeb as Pams.Web

    Client->>IIS: HTTP request
    IIS->>IISIntegration: Forward request
    IISIntegration->>PamsWeb: Invoke ASP.NET Core pipeline
    PamsWeb-->>IISIntegration: HTTP response
    IISIntegration-->>IIS: Forward response
    IIS-->>Client: HTTP response
```

## Usage

```ts
async function loadPamsData() {
  const response = await fetch("/api/pams");

  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }

  return response.json();
}

loadPamsData().then((data) => {
  console.log(data);
});
```

## AI Coding Instructions

- Keep `Microsoft.AspNetCore.Server.IISIntegration` referenced in `Pams.Web.csproj` when the application is deployed behind IIS.
- Configure ASP.NET Core middleware and endpoints in the application startup path; IIS integration forwards requests into that pipeline.
- Test application routes through the IIS-hosted deployment path, not only through local development hosting.
- Check IIS site bindings, application pool settings, and deployment configuration when requests do not reach Pams.Web.

## Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Injected or called by (1)

- `Pams.Web` — `Pams/Web/Pams.Web/Pams.Web.csproj`:1
