Configuring UGC on a .NET Web site
You need to configure your web.config file for UGC.
Procedure
- Access the root of your .NET Web site and open web.config in a plain-text or XML editor. If your .NET Web site does not yet have a web.config file, copy it from the SDL Tridion installation media, from the folder Content Delivery\resources\web\.
- In web.config, add a new
<appSettings>node with the following contents:<appSettings> <add key="ODataEndPoint.URL" value="http://mysite/ws/odata.svc" /> <add key="ODataEndPoint.ConnectionTimeout" value="20000" /> <add key="ODataEndPoint.ReadTimeout" value="20000" /> </appSettings>in which you make the following replacements:
- Change http://mysite/ws/odata.svc into the URL of your Content Delivery Web service
- Change either of the timeout values to a different number of milliseconds if you expect this 20 second default to be inadequate for your implementation.
- Add the UGC tag prefix to web.config by adding the following element in the
<controls>section, located inside the<pages>section:<add tagPrefix="ugc" namespace="Tridion.ContentDelivery.UGC.Web.UI" assembly="Tridion.ContentDelivery.UGC" /> - Save and close web.config.
- If you registered Server Controls, change all relevant Page Templates to add a Page directive at the top of every published Web page (
.ascxpages):<%@ Page Language="C#" %>