Objective
How to manually add the .NET Framework or .NET Core agent to an application on IIS Express when it is not automatically detected by Agent Explorer.
This has been resolved as of the .NET Framework Agent
51.0.22
and .NET Core Agent 4.2.4
releases.Process
The following are the manual commands for adding the .NET Framework or .NET Core agent to an application on IIS Express:
.NET Framework
Install 32-bit
"C:\Program Files\IIS Express\appcmd.exe" install module /name:ContrastNativeHttpModule-32 /image:"C:\Program Files\Contrast\dotnet\runtimes\win-x86\native\ContrastNativeHttpModule.dll" /preCondition:bitness32 /apphostconfig:<FULL PATH TO applicationhost.config>
Install 64-bit
"C:\Program Files\IIS Express\appcmd.exe" install module /name:ContrastNativeHttpModule-64 /image:"C:\Program Files\Contrast\dotnet\runtimes\win-x64\native\ContrastNativeHttpModule.dll" /preCondition:bitness64 /apphostconfig:<FULL PATH TO applicationhost.config>
Uninstall 32-bit
"C:\Program Files\IIS Express\appcmd.exe" uninstall module ContrastNativeHttpModule-32 /apphostconfig:<FULL PATH TO applicationhost.config>
Uninstall 64-bit
"C:\Program Files\IIS Express\appcmd.exe" uninstall module ContrastNativeHttpModule-64 /apphostconfig:<FULL PATH TO applicationhost.config>
.NET Core
Install 32-bit
"C:\Program Files\IIS Express\appcmd.exe" install module /name:ContrastCoreNativeModule-32 /image:"C:\Program Files\Contrast\dotnet-core\sensors\runtimes\win-x86\native\ContrastCoreNativeModule.dll" /preCondition:bitness32 /apphostconfig:<FULL PATH TO applicationhost.config>
Install 64-bit
"C:\Program Files\IIS Express\appcmd.exe" install module /name:ContrastCoreNativeModule-64 /image:"C:\Program Files\Contrast\dotnet-core\sensors\runtimes\win-x64\native\ContrastCoreNativeModule.dll" /preCondition:bitness64 /apphostconfig:<FULL PATH TO APPLICATIONHOST.CONFIG FILE>
Uninstall 32-bit
"C:\Program Files\IIS Express\appcmd.exe" uninstall module ContrastCoreNativeModule-32 /apphostconfig:<FULL PATH TO APPLICATIONHOST.CONFIG FILE>
Uninstall 64-bit
"C:\Program Files\IIS Express\appcmd.exe" uninstall module ContrastCoreNativeModule-64 /apphostconfig:<FULL PATH TO applicationhost.config>
If you attempt this process and issues persists, please contact support@contrastsecurity.com or open a ticket directly in our portal for further assistance.