Skip to content

IIS 7+ Native Module

  • Written in C++ 14 using Visual Studio 2017.
  • Hooks into IIS 7+ as a "native module".
  • Designed to be installed as a server-wide module. (Per-site installation is supported with some small caveats.)
  • Maintains a pool of sockets connected to the Agent (now deprecated)
  • All TCP communication with the Agent is asynchronous (using Boost ASIO). Will only block IIS in the case where there is no socket available in the pool.
  • Compiles to a single, dependency-free 64-bit DLL file.
  • Gracefully handles bad/incomplete msgpack data received from the Agent.
  • Implements a "fail open" Agent RPC timeout.

Installation

See the public docs for installation: https://docs.signalsciences.net/install-guides/other-modules/iis/

Configuration

You do not need to change any configuration changes in order to use the module. It will use the default Agent port (737) or whatever was detected on install.

Configuration can now be done with the SigsciCtl.exe utility (v2.0.0+) via the Configure-Module command:

Usage: SigsciCtl command [options]

Commands:
  Register-Module [-file <path>]
      Register IIS module
  Unregister-Module
      Unregister IIS module
  Get-Modules
      Get IIS modules
  Register-Config [-file <path>]
      Register IIS configuration
  Unregister-Config
      Unregister Signal Sciences IIS configuration
  Get-Configs
      Get the module configuration
  Configure-Module [-site name] option=value ...
      Configure module options as "option=value" pairs:
        - Use the Get-Configs command for current values and valid options
        - Use the -site option to configure a specific site only
        - Use value of "!" to revert an option to its default value
        EX: Configure-Module agentPort=9999
  Install [option=value ...]
      Install the module in IIS by performing all registration steps (repair an install):
        - Register the module with IIS
        - Register the config schema with IIS
        - Configure the module agentHost/agentPort if required
        - Optionally configure the module with any passed in options
  Uninstall [-upgrade true]
      Uninstall the module in IID by performing all unregistration steps:
        - Unregister the module from IIS
        - Unregister the config schema from IIS
        - Will NOT remove any installed files (use Windows package uninstall for this)
  Get-AgentConfig [-file <path>]
      Get the agent configuration
  Info
      Show installation information
  Version
      Show version and exit.
  Help
      This help

Example of changing the agent port and status page path:

C:\Program Files\Signal Sciences\IIS Module> SigsciCtl.exe Configure-Module agentHost=9999 statusPagePath=/status

You can get the configuration via the Get-Configs command:

C:\Program Files\Signal Sciences\IIS Module> SigsciCtl.exe  Get-Configs
C:\WINDOWS\system32\inetsrv\config\schema:

"SignalSciences" Configuration Section (Global):

Attribute                        Value
-------------------------------- ----------------------------------------------------------------
                       agentHost 9999
                       agentPort 737
                  statusPagePath /status
                           Debug False
                ReuseConnections False
                     MaxPostSize 100000
                     AnomalySize 524288
           AnomalyDurationMillis 1000
                   TimeoutMillis 200

"SignalSciences" Configuration Section (site="default"):

Attribute                        Value
-------------------------------- ----------------------------------------------------------------
                       agentHost 9999
                       agentPort 737
                  statusPagePath /status
                           Debug False
                ReuseConnections False
                     MaxPostSize 100000
                     AnomalySize 524288
           AnomalyDurationMillis 1000
                   TimeoutMillis 200

And you can reset any config items to default by setting them to !:

C:\Program Files\Signal Sciences\IIS Module> SigsciCtl.exe Configure-Module agentHost=! statusPagePath=!

C:\Program Files\Signal Sciences\IIS Module> SigsciCtl.exe Get-Configs
C:\WINDOWS\system32\inetsrv\config\schema:

Date                 Size         Name
-------------------- ------------ --------------------------------
2020-06-30 12:11:26Z          686 SignalSciences_schema.xml

"SignalSciences" Configuration Section (Global):

Attribute                        Value
-------------------------------- ----------------------------------------------------------------
                       agentHost 127.0.0.1
                       agentPort 737
                  statusPagePath
                           Debug False
                ReuseConnections False
                     MaxPostSize 100000
                     AnomalySize 524288
           AnomalyDurationMillis 1000
                   TimeoutMillis 200

"SignalSciences" Configuration Section (site="default"):

Attribute                        Value
-------------------------------- ----------------------------------------------------------------
                       agentHost 127.0.0.1
                       agentPort 737
                  statusPagePath
                           Debug False
                ReuseConnections False
                     MaxPostSize 100000
                     AnomalySize 524288
           AnomalyDurationMillis 1000
                   TimeoutMillis 200

Configuration can also be changed manually by editing %SYSTEMROOT%\system32\inetsrv\config\applicationHost.config.

Add under /configuration/configSections:

<section name="SignalSciences" overrideModeDefault="Allow" />

Add under /configuration:

<SignalSciences agentPort="9999" statusPagePath="/status" />

Setting up a development environment

See: DEVELOPMENT.md

Troubleshooting

See: TROUBLESHOOTING.md

Testing

This module uses the standard module-testing framework, but with the caveat of having to do the testing on Windows with docker.

See: module_testing/README.md