Deploying AcuSensor for ASP .NET Core

🔍 AcuSensor Network PreRequisites

AcuSensor makes use of the AcuSensor Bridge. Read more information here.

Deploying AcuSensor for ASP .NET Core websites

First, you need to download the AcuSensor agent for your Target.

The AcuSensor agent will need to be deployed to your web application. This section describes how to deploy AcuSensor to an ASP.NET Core web application.

Prepare the .NET Core Acusensor

  • Create a folder which will host your AcuSensor files; for this example, we will assume the folder is C:\acusensor
  • Right-click on your downloaded AcuSensor ZIP file

  • Click on the Extract All… option

  • Select a destination folder and click the Extract button
  • Navigate to the destination folder and enter the .NET Core subfolder
  • Select all the items inside the subfolder, right-click on them and select Copy

  • Navigate to the C:\acusensor folder, right-click in the window and select the Paste option

Deploying into a Kestrel .NET Core website

  • Navigate to your web application root folder

  • Create a new sitelauncher.bat file inside your web application root folder with the following contents:

SET CORECLR_ENABLE_PROFILING=1

SET CORECLR_PROFILER={7EF83539-BAB0-44D1-8E8C-48E6EC9938FA}

SET CORECLR_PROFILER_PATH=C:/acusensor/SensorProfiler.dll

SET SENSOR_SETTINGS_PATH=C:/acusensor/settings.ini

axexample-dotnetcore.exe --urls http://0.0.0.0:80

  • …assuming that the executable file for your web application is axexample-dotnetcore.exe
  • From the command line, navigate to your web application root folder and launch your web application

Deploying into an IIS .NET Core website

  • Navigate to your web application root folder

  • Edit your web.config file to add environment variables for using AcuSensor:

<?xml version="1.0" encoding="utf-8"?>

<configuration>

  <location path="." inheritInChildApplications="false">

    <system.webServer>

      <handlers>

        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />

      </handlers>

      <aspNetCore processPath="dotnet" arguments=".\axexample-dotnetcore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">

        <environmentVariables>

          <environmentVariable name="CORECLR_PROFILER_PATH" value="C:/acusensor/SensorProfiler.dll" />

          <environmentVariable name="CORECLR_ENABLE_PROFILING" value="1" />

          <environmentVariable name="CORECLR_PROFILER" value="{7EF83539-BAB0-44D1-8E8C-48E6EC9938FA}" />

          <environmentVariable name="SENSOR_INCLUDE_EXE" value="iisexpress.exe;w3wp.exe" />

          <environmentVariable name="SENSOR_SETTINGS_PATH" value="C:/acusensor/settings.ini" />

        </environmentVariables>

      </aspNetCore>

    </system.webServer>

  </location>

</configuration>

<!--ProjectGuid: 16505b2e-7499-4c97-a9ff-d18e39913ad5-->

  • Restart your web application from IIS Manager

 

« Back to the Acunetix Support Page