Installing the API (RESTful) Server Role as a .NET Web application
Installing the API (RESTful) Server Role as a .NET Web application requires some Web application-server specific configuration before deployment can start.
Procedure
- Ensure that on the machine on which API (RESTful) runs, the .NET Framework has the WCF Services feature "HTTP Activation" switched on.
- Disable recycling of the Application Pool of this Web application by doing the following:
- Open IIS Manager.
- From the tree on the left, select the current machine and navigate to the Web application you just created.
- Click Advanced settings to open a dialog with the application's properties, and note down the value of Application Pool.
- Close the dialog.
- From the tree on the left, under the current machine, now select the Application Pools node.
- From the list on the right, select the Application Pool you just noted down.
- Select Recycling in the Edit Application Pool area on the right.
- In the dialog that opens, deselect Regular time intervals, then click Next and Finish to commit your change.
- Restart IIS.
- On your SDL Web installation media, navigate to Content Delivery\roles\api\rest\config\.
- In your .NET Web application root, open Web.config for editing.
- Ensure that the file contains the following fragment:
<add key="discovery-service-uri" value="URI"/> <add key="oauth-enabled" value="BOOLEANVALUE"/> <add key="oauth-client-id" value="USERNAME"/> <add key="oauth-client-secret" value="PASSWORD"/>where:URIis the URL of the Discovery Endpoint.BOOLEANVALUEistrueif OAuth authentication is enabled (recommended) orfalseif it is not.USERNAMEandPASSWORDare valid Token Service credentials that grant the client access to the Discovery Endpoint. You can find valid credentials in the Ambient Data Framework configuration file, cd_ambient_conf.xml, of the Discovery Service. Note that the value ofClientSecretmust be an encrypted value.
- Also ensure that some form of client-side caching is configured in Web.config for the .NET Web application.
- Save and close Web.config.
- Restart the Web application.
- Configuring .NET client-side caching
Configure client-side caching on your .NET Web site by modifying the Web.config file.