Deploying a .NET IAST agent
This topic explains how to create a .NET IAST agent type on your web server.
Before you begin
If the server running IAST is behind a proxy, the IAST .NET agent supports two ways to configure an outbound HTTP proxy:
- System proxy settings, which are automatically detected from standard OS settings or the HTTP_PROXY, HTTPS_PROXY environment variables.
-
IAST-specific proxy settings, defined with the application’s own
environment variables. Configure them as
follows:
IAST_PROXY_HOST={proxy_ip} IAST_Deploy_dot_net.html
If the application-specific variables are set, they take precedence. Otherwise, the system proxy is used. If neither is defined, the application connects directly. Proxy settings are read at startup, so changes require a restart. Check the IAST log to verify that the proxy is configured correctly.
About this task
Procedure
Results
Deploying to a separate server
Install the IAST NuGet package on the build or development machine, then deploy the application and all required IAST files to the target server.
About this task
Many .NET applications are developed and built on one machine and then deployed to a different server.
In this scenario, install the IAST NuGet package only in the application project on the build or development machine. Do not install the NuGet package separately on the target server.
Procedure
Results
The application is deployed to the target server with the required IAST files.
What to do next
Important: The IAST agent consists of multiple assemblies. Missing files can prevent the agent from loading or operating correctly. Always verify the deployed files against the required file list after deployment.
Troubleshooting instructions
If the IAST session in ASoC does not reach the Connected status after the application starts, review the IAST agent log for additional diagnostic information.
On Windows, the log is typically created under the account running the application, for example: C:\Users\<user-name>\AppData\Local\Temp\Secagent
In some server environments, permission restrictions may prevent the agent from creating log files in this location. If no logs are present, configure a custom log directory by using one of the following methods:
- Create a folder in a location that is accessible to the application.
- Configure a custom log directory using one of the following
methods:
- Option 1: Environment variable
Create an environment variable named secagent.log and set its value to the full path of a folder that is accessible to the application.
- Option 2: Application configurationSpecify the log directory in the application's configuration:
.NET Framework (web.config): <appSettings> <add key="IASTAgentKey" value="..." /> <add key="IASTHost" value="..." /> <add key="IASTLogLocation" value="C:\Logs\Secagent" /> </appSettings> .NET Core (appsettings.json or equivalent configuration source): { "IASTAgentKey": "...", (optional) "IASTHost": "...", (optional) "IASTLogLocation": "C:\\Logs\\Secagent" (optional) }
- Option 1: Environment variable
- Restart the application. The agent log file is created in the
specified folder.Note:Ensure that the application account has read and write permissions for the configured log directory.