6

Firstly, this is an 8.5 instance, upgraded from 2013, upgraded from 2011. We have Audience Manager installed (and working well) and outbound email.

I have a set of custom events that subscribe (when the services are started) and execute (when publishing) as expected.

We are, however, unable to use Template Builder as it fails on initialization - stating errors with the same event code.

I've confirmed the custom DLL is the same version in

  • \SDL Web\bin (as configured in tridion.contentmanager.config)
  • \SDL Web\templates\bin (not 100% certain it needs to be there likely clean later)
  • \SDL Web\webservices\bin (not 100% certain it needs to be there likely clean later)

I've tried this with a PT with no TBBs attached. CPs/Pages Preview and Publish.

The error (below) only shows the first time I run Template Builder, following that the default TCM Event DLL then fails - consistently. If I restart Template Builder App - back to the first error.

ERROR ON FIRST RUN

Debugger: Initialization of the extension 'C:\Program Files (x86)\SDL Web\bin\CUSTOM.Tridion.Events.dll' failed.
   at Tridion.ContentManager.Extensibility.TcmExtension.LoadExtensions()
   at Tridion.ContentManager.Extensibility.TcmExtension.InitializeExtensions()
   at Tridion.ContentManager.Session..ctor(String userName)
   at Tridion.ContentManager.Templating.Debugging.DebuggingEngine..ctor(DebugSession debugSession, String compoundTemplateUri, String compoundTemplateContent, Boolean preview, String userName)
   at Tridion.ContentManager.Templating.Debugging.DebugSession..ctor(String sessionId, String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel)
   at Tridion.ContentManager.Templating.Debugging.DebuggerRemoteRunner.StartDebugger(String sessionId, String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, String logLevelString, String previewDirectory, String previewUrl)


Component: Templating
Errorcode: 0
User: NT AUTHORITY\NETWORK SERVICE
THEN
Initialization of the extension 'C:\Program Files (x86)\SDL Web\bin\CUSTOM.Tridion.Events.dll' failed.
   at Tridion.ContentManager.Extensibility.TcmExtension.LoadExtensions()
   at Tridion.ContentManager.Extensibility.TcmExtension.InitializeExtensions()
   at Tridion.ContentManager.Session..ctor(String userName)
   at Tridion.ContentManager.Templating.Debugging.DebuggingEngine..ctor(DebugSession debugSession, String compoundTemplateUri, String compoundTemplateContent, Boolean preview, String userName)
   at Tridion.ContentManager.Templating.Debugging.DebugSession..ctor(String sessionId, String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel)
   at Tridion.ContentManager.Templating.Debugging.DebuggerRemoteRunner.StartDebugger(String sessionId, String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, String logLevelString, String previewDirectory, String previewUrl)


Component: Templating
Errorcode: 0
User: NT AUTHORITY\NETWORK SERVICE

StackTrace Information Details:
   at Tridion.ContentManager.Templating.Debugging.Debugger.StartNewDebugger(String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel)

ERROR ON SUBSEQUENT RUNS

Initialization of the extension 'C:\Program Files (x86)\SDL Web\bin\CUSTOM.Tridion.Events.dll' failed.
   at Tridion.ContentManager.Extensibility.TcmExtension.LoadExtensions()
   at Tridion.ContentManager.Extensibility.TcmExtension.InitializeExtensions()
   at Tridion.ContentManager.Session..ctor(String userName)
   at Tridion.ContentManager.Templating.Debugging.DebuggingEngine..ctor(DebugSession debugSession, String compoundTemplateUri, String compoundTemplateContent, Boolean preview, String userName)
   at Tridion.ContentManager.Templating.Debugging.DebugSession..ctor(String sessionId, String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel)
   at Tridion.ContentManager.Templating.Debugging.DebuggerRemoteRunner.StartDebugger(String sessionId, String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, String logLevelString, String previewDirectory, String previewUrl)


Component: CompoundTemplateWebService
Errorcode: 0
User: NT AUTHORITY\NETWORK SERVICE

StackTrace Information Details:
   at Tridion.ContentManager.Templating.Debugging.Debugger.StartNewDebugger(String compoundTemplateUri, String compoundTemplateContent, String itemUri, String packageContents, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel)
   at Tridion.ContentManager.Templating.Debugging.Debugger.StartNewDebuggerForItemUri(String compoundTemplateUri, String compoundTemplateContent, String itemUri, Boolean preview, String publicationTargetUri, String userName, Boolean logTridionClasses, TraceEventType logLevel)
   at Tridion.ContentManager.Templating.WebService.CompoundTemplateWebService.StartDebuggingWithItemUri(String compoundTemplateId, String compoundTemplateXml, String itemId, Boolean includeSystemLog, TraceEventType logLevel)

I'm seeing nothing in the logs (other than the error noted above from the Event Logs).

I've increased logging on Template Builder but nothing - this only logs once a certain point of initialization has been hit.

I've confirmed the Services are running as expected

  • Publisher with Local User (permissions to read on assembly)
  • Service Host with NETWORK SERVICES (permissions to read on assembly)

I checked with ProcMon and confirmed no ACCESS DENIED for Tcm activities.

1
  • Can you try changing or add the order (to the question) in which your Custom event is being executed from your Tridion.ContentManager.config? I have noticed that there are a few changes in the way certain events are initialized with 8.5.
    – Shiva
    Commented Dec 6, 2018 at 16:24

2 Answers 2

2

If you run/debug a Template in Template Builder, it will be executed on the CM Server in a process called TcmTemplateDebugHost. This process hosts the entire CM Kernel, including all configured extensions.

You can attach a (remote) debugger to this process to debug your .NET Template code, but also your custom extensions.

So: I would recommend to attach a debugger toTcmTemplateDebugHost and set it to break on all exceptions. Then try to run/debug a template and see if the debugger breaks in your custom extension.

1

In the application, there is also RedSharp. It seems that, although the version of **Log4Net* in the app and used by RedSharp is the same - there's some odd conflict and rather than falling over on one - the application simply stops.

Removing Log4Net from the application (and not touching the RedSharp instance) allows Template Builder to load and work. Not a long-term solution I accept but workable for now.

I'm hoping the client digs deeper to resolve and I can update this post with more information on the root cause/fix.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.