I got a question recently about how the .NET version of Tridion Content Delivery figures out where your configuration files are located.
As I didn’t know all of the details, I decided to investigate and share my findings here.
In Tridion 2011 SP1, it looks for configuration and JAR files under the following folders (listed in order):
- The bin directory from the current web context (e.g. Server.MapPath(“~/bin”)). This is only used if there is an HttpContext available (e.g. running within a web site).
- The current directory, as returned by Environment.CurrentDirectory.
- The TRIDION_HOME registry value (HKLM\Software\Tridion\Content Delivery\General)
- The TRIDION_HOME environment variable.
- The default Tridion installation folder (C:\Program Files\Tridion)
- The directory exists.
- It has a lib subfolder containing the CD JAR files such as cd_core.jar and cd_model.jar.
- It has a config subfolder containing the CD configuration files such as cd_broker_conf.xml or cd_storage_conf.xml.
You can tell which location it has settled on by looking for “Content Delivery.NET” events in the “Tridion Content Manager” Event Log. You will see a message such as “Using HttpContext current bin directory as Tridion Home”.
That’s it! A mystery no longer…