---
title: .Net Core module install
summary: null
url: >-
  https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/dotnet-core
---

## Requirements

- .NET Core 2.1 or later.
- Verify you have installed the Next-Gen WAF agent for your platform (e.g., Linux or Windows). Check out our [Getting started with the agent](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent/) guide.

## Installation

1. Download the latest Signal Sciences HTTP middleware using one these methods:

   - Directly from [https://dl.security.fastly.com](https://dl.security.fastly.com/?prefix=sigsci-module-dotnetcore/)
   - Directly from [https://dl.signalsciences.net](https://dl.signalsciences.net/?prefix=sigsci-module-dotnetcore/)
   - Via [Nuget](https://www.nuget.org/packages/SignalSciences.Module.DotNetCore/)

2. Add the Signal Sciences HTTP middleware to your project. Replace `<packagePath>` with the path to `SignalSciences.HttpMiddleware.<version>.nupkg` and `<sourcePath>` with the folder-based package source to which the package will be added:

   ```xml
   nuget add <packagePath> -Source <sourcePath> -Expand
   dotnet add package SignalSciences.HttpMiddleware -s <sourcePath>
   ```

3. Add the following sections to your application's `appsettings.json` file:

   ```json
   {
       "SigsciOptions": {
           "AgentEndPoint": "127.0.0.1:2345"
       }
   }
   ```

4. Configure the HTTP request pipeline with `Configure`:

   ```csharp
   Configure(IApplicationBuilder app, IHostingEnvironment env) {
       var sigsciOptions = Configuration.GetSection("SigsciOptions").Get();
       app.UseSigSciHandler(sigsciOptions);
   }
   ```

5. Restart the web site service.

> **IMPORTANT:** Ensure the `AgentEndPoint` value is set to the same IP and port configured with the Next-Gen WAF agent's `rpc-address` value. See the [Windows agent installation documentation](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/installing-the-agent) for additional information about Windows agent configuration options.

## .NET Core module configuration

| Option                  | Default                   | Description                                                                                                                |
| ----------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `AgentEndPoint`         | required, no default      | The TCP endpoint (`host:port`) that the Agent is listening on. `host` can be either a hostname or an IPv4 or IPv6 address. |
| `AgentRpcTimeoutMillis` | optional, default: 200    | Maximum number of milliseconds allowed for each RPC call to the Agent.                                                     |
| `MaxPostSize`           | optional, default: 100000 | A request body above this size will not be sent to the Agent.                                                              |
| `AnomalySize`           | optional, default: 524288 | If the HTTP response is this size or larger, log it with the Agent.                                                        |
| `AnomalyDurationMillis` | optional, default: 1000   | If the response took longer than this number of milliseconds, log it with the Agent.                                       |
| `ExpectedContentTypes`  | optional, no default      | Adds custom types that allow inspection to the conditional content-type list.                                              |

### Sample advanced .NET Core module configuration

```json
{
	"SigsciOptions": {
		"AnomalySize": 200000,
		"AgentRPCTimeoutMillis": 200,
		"MaxPostSize": 50000,
		"AnomalyDurationMillis": 1000,
		"AgentEndPoint": "127.0.0.1:2345",
		"ExpectedContentTypes": "application/custom-abc application/hal-test"
	}
}
```

## Related content

- [About module-agent deployment](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment)
- [Using an API with the Next-Gen WAF](https://www.fastly.com/documentation/guides/next-gen-waf/developer/using-an-api-with-the-next-gen-waf)
