Adding Experience Optimization to your .NET API (RESTful) Role

Copy and merge resources used by Experience Optimization to your .NET API (RESTful) Role.

Before you begin

The .NET web application to which you add Experience Optimization resources must have the API (RESTful) Content Delivery Role installed.
  • Simple method: Copy DLLs for the Content Delivery Role to the web application.
  • Alternative method: You have configured your web application to connect to the online Content Interaction Libraries (CILs) to ensure that your web application makes use of the latest versions of the CILs. For .NET, you do this by connecting to the Tridion Sites Delivery NuGet package from Visual Studio.

Procedure

  1. Access your installation media and go to the following folder: Content Delivery\roles\xo\api\rest\dotnet\bin\
  2. Copy the following DLLs from the installation media to the bin/ subdirectory of your .NET web application:
    • Sdl.Web.Experience.dll
    • Tridion.Smarttarget.dll
  3. Copy or merge files from the installation media to the config/ subdirectory of the web application, as follows:
    1. smarttarget_conf.xml — Copy the file. You will configure settings in the file in a later task.
    2. smarttarget.referrers.xml — (Optional) Copy the file if you want to use search terms extracted from the referrer in the search of your website.
    3. cd_client_conf.xml — If you have an existing file in your web application, merge the file with the existing file. Additional configuration will be needed in the next step.
  4. Access your installation media and go to the following folder: Content Delivery\roles\xo\api\rest\dotnet\bin\
  5. Open your web application's cd_client_conf.xml file for editing and do the following:
    1. Locate the DiscoveryService element, and edit the discoveryurl to point to your Discovery Service. It should look something similar to the following:
      <ServiceConfig Version="11.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:noNamespaceSchemaLocation="schemas/xo-search-conf.xsd"
                     ConnectionTimeout="${indexconnectiontimeout:-10000}"
                     ReadTimeout="${indexreadtimeout:-30000}"
                     WriteTimeout="${indexwritetimeout:-30000}"
                     MaxIdleConnections="${indexmaxidleconnections:-30}">
      
          <DiscoveryService ServiceUri="${discoveryurl:-http://localhost:8082/discovery.svc}"/>
          <TokenService ClientId="${clientid:-cduser}" ClientSecret="${clientsecret:-encrypted:o/cgCBwmULeOyUZghFaKJA==}"/>
          <QueryClient Class="com.sdl.tridion.xo.query.client.rest.RestQueryClient" />
      </ServiceConfig>
    2. Save and close cd_client_conf.xml.
  6. If you have chosen not to reference the online Content Interaction Libraries (CILs) on Nuget from your Visual Studio project, then copy the contents of the api\rest\dotnet\bin\ folder to the website's bin\ folder on your target machine.
  7. Restart the website.