System.Web

Installation

Two types of installation are available for deploying the DataDome module.

1. Standard Installation

Download the following file to your server:

https://package.datadome.co/aspnet/DataDome-SystemWeb4-latest.zip

Extract the files then copy the /bin folder contents to your website's /bin folder.

2. NuGet Installation

The HTTP module is available as a NuGet package.
You can add it to the project using your favorite IDE (i.e. Visual Studio, Xamarin Studio, MonoDevelop, SharpDevelop) via the NuGet console or any other NuGet-compatible tools (i.e. Continuous Integrations and Delivery tools like TeamCity, Octopus Deploy, etc.)

Install-Package DataDome.SystemWeb

Registering

If the Web site does not already have a Web.config file, create one under the site's root. Then add the following code to the newly created Web.config file or update your existing Web.config file, and add a section with module registration:

<configuration>
	[...]
	<system.webServer>
		[...]
		<modules runAllManagedModulesForAllRequests="true">
			[...]
			<add name="DataDome" type="DataDome.Web.ConnectorHttpModule, DataDome.SystemWeb" />
		</modules>
	</system.webServer>
</configuration>
<configuration>
	[...]
	<system.web>
		[...]
		<httpModules>
			[...]
			<add name="DataDome" type="DataDome.Web.ConnectorHttpModule, DataDome.SystemWeb" />
		</httpModules>
	</system.web>
</configuration>

Depending on your configuration, you may need to set IIS -> Application Pools -> (Your AppPool) -> Advanced Settings (on the right) -> Load User profile to true

Configuring the module

The module can be configured by editing the appSettings section of the Web.config file, similarly to the example below:

<configuration>
	[...]
	<appSettings>
		[...]
		<add key="dome:domain" value="api.datadome.co" />
		<add key="dome:protocol" value="http" />
		<add key="dome:license" value="...you secret license key..." />
	</appSettings>
</configuration>

Available settings are listed here.