Adding the Experience Manager Web site extension to a .NET Web site

To add Experience Manager to your existing staging Web site in IIS, install the Experience Manager Web site extension as a .NET Web application in the staging Web site. Note also that if you have a classic ASP Web site, you can skip this task.

Procedure

  1. Ensure that all the prerequisites for a Content Delivery Server Role are met on your target system.
  2. If you use Windows 2012 or Windows 2012 R2, do the following:
    1. Start up the Server Manager and Add Roles and Features Wizard. Step through the wizard until you reach the Features screen.
    2. If you use .NET 4.5, expand the item .NET Framework 4.5 Features and the subitem WCF Services. If the option HTTP Activation is not listed as installed, select it.
    3. Alternatively, if you use .NET 3.5, expand the item .NET Framework 3.5 Features. If the option HTTP Activation is not listed as installed, select it.
    4. Click Next and Install to install the feature.
  3. If you use Windows 2008 R2 SP1, do the following:
    1. Start up the Server Manager and under Features Summary, select Add Features.
    2. In the Add Features dialog that opens, expand the item .NET Framework 3.5.1 Features and the subitem WCF Activation. If the option HTTP Activation is not listed as installed, select it.
    3. Click Next and Install to install the feature.
  4. If this is a 32-bit .NET Web application running in combination with Java 6, then in the advanced system properties of your machine, select Environment Variables to see and edit your environment variables, and ensure that your PATH variable contains the bin\ subfolder of the Java instance you are using. This location contains the file MSVCR71.DLL.
  5. Access the SDL Tridion installation media.
  6. Navigate to the Content Delivery\roles\ folder.
  7. Access the preview\web\dotNET\webapp\ subfolder.
  8. Do one of the following:
    • To install a 32-bit .NET Web application, unzip the Zip file x86.zip in this location to the location on your target system where you want to place the .NET Web application.
    • To install a 64-bit .NET Web application, unzip the Zip file x86_64.zip in this location to the location on your target system where you want to place the .NET Web application.

    Typically, the place to install will be your existing staging Web site, but especially in a testing scenario, you may want to run this Web application by itself.

  9. If you store published content in a database, download the JDBC driver (JAR file) required for your specific database vendor and copy it into the bin\lib folder of your Web application:
    VendorJDBC DriverRequired JAR
    Microsoft SQL ServerMicrosoft SQL Server JDBC Driver 4.0

    sqljdbc42.jar for Java 8

    sqljdbc4.jar for Java 6 or Java 7

    OracleOracle JDBC driver 11.2.0.3 (deprecated)

    ojdbc6.jar for Java 6 or Java 7

    OracleOracle JDBC driver 12.1.0.1

    ojdbc7-12.1.0.1.jar for Java 8

    ojdbc7.jar for Java 7

    ojdbc6.jar for Java 6

    IBM DB2IBM Data Server Driver for JDBC and SQLJ (9.7 GA) (deprecated)

    Not supported with Java 8

    db2jcc.jar for Java 6 or Java 7

    You can download JDBC drivers from the following locations:
  10. Navigate to the folder \Content Delivery\roles\preview\web\configuration\samples\.
  11. Copy logback.xml from that folder to the bin\config folder of your Web application.
  12. Copy each of the files that end in _sample.xml to the bin\config folder of your Web application, and rename them by removing the string _sample from each filename (for example, rename cd_storage_conf_sample.xml to cd_storage_conf.xml).
  13. Open cd_ambient_conf.xml for editing.
  14. Ensure the presence of the following lines inside the <Cartridges> section:
    <Cartridge File="cd_webservice_preview_cartridge.xml"/>
    <Cartridge File="footprint_cartridge_conf.xml"/>
  15. Save and close cd_ambient_conf.xml.
  16. Open cd_dynamic_conf.xml in a plain-text or XML editor, and insert the following structure as the first child element inside the root element. This section may already exist, in which case you can use the mappings you see, and add new ones if needed.
    <URLMappings>
    	<StaticMappings>
    		<Publications>
    			<Publication Id="23">
    				<Host Domain="example.com" Port="91" Protocol="http" Path="/local-fr" />
    			</Publication>
    		</Publications>
    	</StaticMappings>
    	<StorageMapping IdentifyPublicationByProperty="publicationUrl" />
    </URLMappings>
    This example makes it possible to retrieve metadata for a Web page located in the http://example.com:91/local-fr/ by checking the corresponding Page in the Publication with ID 23 in the Content Manager.
  17. Save and close cd_dynamic_conf.xml.
  18. Copy cd_licenses.xml, your Content Delivery license file available from SDL Tridion Customer Support, to the bin\config directory of your Web application.
    If you want to name the file differently or put it in a different location, you need to update the License element in your configuration files.
  19. Optional: Configure logging.
  20. Configure the Storage Layer and optionally encrypt sensitive strings.
  21. Open Web.config for editing in the root folder of this Web application.
  22. To enable the Ambient Data Framework, do the following:
    Application Pool in Classic Mode

    Ensure the presence of the following inside the <httpModules> section inside the <system.web> section (create an <httpModules> element if it does not yet exist):

    <add type="Tridion.ContentDelivery.AmbientData.HttpModule" 
    	name="Tridion.ContentDelivery.AmbientData.HttpModule" />

    To enable the Ambient Data Framework for static Web pages, also do the following:

    • Ensure the presence of the following inside the <handlers> section inside the <system.webServer> section (create a <handlers> section if it does not yet exist):

      <remove name="StaticFile" />
      <add name="StaticFile" path="" verb="" modules="IsapiModule,StaticFileModule,DefaultDocumentModule,DirectoryListingModule"
        scriptProcessor="c:\PATH\TO\DOTNET\aspnet_isapi.dll" resourceType="Either" requireAccess="Read" preCondition="bitness64" />

      where c:\PATH\TO\DOTNET\ is the path to your .NET Framework root folder, for example, C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.

      If you run 32-bit .NET, remove the preCondition attribute.

    • Ensure the presence of the following inside the <httpHandlers> section inside the <system.web> section (create an <httpHandlers> section if it does not yet exist):

      <add verb="GET" path="*" type="System.Web.StaticFileHandler" />
    Application Pool in Integrated Mode

    Add the following inside the <modules> section inside the <system.webServer> section (create a <modules> element if it does not yet exist):

    <add type="Tridion.ContentDelivery.AmbientData.HttpModule" 
    	name="Tridion.ContentDelivery.AmbientData.HttpModule" />
  23. In the location of your Ambient Data Framework module, do the following:
    Application Pool in Classic Mode

    Add the following inside the <httpModules> section inside the <system.web> section:

    <add name="Tridion.ContentDelivery.Preview.Web.PreviewContentModule" 
      type="Tridion.ContentDelivery.Preview.Web.PreviewContentModule" />
    Application Pool in Integrated Mode

    Add the following inside the <modules> section inside the <system.webServer> section:

    <add name="PreviewContentModule" type="Tridion.ContentDelivery.Preview.Web.PreviewContentModule" />
  24. Save and close Web.config.
  25. Disable recycling of the Application Pool of this Web application by doing the following:
    1. Open IIS Manager.
    2. From the tree on the left, select the current machine and navigate to the Web application you just created.
    3. Click Advanced settings to open a dialog with the application's properties, and note down the value of Application Pool.
    4. Close the dialog.
    5. From the tree on the left, under the current machine, now select the Application Pools node.
    6. From the list on the right, select the Application Pool you just noted down.
    7. Select Recycling in the Edit Application Pool area on the right.
    8. In the dialog that opes, deselect Regular time intervals, then click Next and Finish to commit your change.
    9. Restart IIS.
  26. Still in IIS Manager, select the staging Web site. Double-click HTTP Reponse Headers on the right. In the Actions panel that appears on the far right, click Set Common Headers. In the dialog that opens, check Expire Web content and set the values for After to 36500 and Day(s) (that is, 100 years from now). Click OK to commit your change, then close IIS Manager.
  27. Restart the Web application.