Installing the Ambient Data Framework in a .NET Web application
To install the Ambient Data Framework for a Content Delivery .NET Web application, copy JAR files, copy a configuration file, and modify Web.config.
Procedure
- On the installation media, navigate to the Content Delivery\roles\api\ folder.
- Do one of the following:
- If your .NET Web application uses the API (RESTful) Role, navigate to the rest\ subfolder.
- If your .NET Web application uses the API (in-process) Role, navigate to the in-process\ subfolder.
- Copy the following files from the installation media to the bin\lib\ folder of your Web application:
- From the java\lib\ folder: cd_ambient.jar
- From the java\third-party-lib\ folder: json-smart.jar
Note: If the API Server Role is installed in this Web application, these JAR files are already present. - Copy the followings files from the folder dotnet\bin\to the bin\ folder of your Web application:
- Tridion.ContentDelivery.AmbientData.dll
- Tridion.ContentDelivery.AmbientData.Interop.dll
Note: If the API Server Role is installed in this Web application, these DLL files are already present. - Copy cd_ambient_conf_sample.xml from the Content Delivery\resources\configurations\ folder to your bin\config folder and rename the file to cd_ambient_conf.xml.
- Open cd_ambient_conf.xml for editing.
- Find the
<Security>section and enclose it in comments. This element is only needed if you intend to set up OAuth authentication. - Save and close cd_ambient_conf.xml.
- Open Web.config for editing in the root folder of this Web application.
- 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
preConditionattribute.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="*.jpg" 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" />
- Save and close Web.config.
- Restart the Web application.