tridion - 在复合模板中使用 C# 进行渲染时出现问题

标签 tridion tridion2009

在复合模板中发布/渲染某段代码时,其中一个环境突然出现问题。这是一个 DTAP 环境,问题只发生在生产环境(一如既往;-),那里有两台 CMS 机器和两个发布者。都表现出相同的行为。

导致问题的代码是:

StructureGroup SG = (StructureGroup)engine.GetObject("/webdav/pub/root/etc/etc...");

模板构建器中的错误是:
System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.77.66.136:80 
   bij System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) 
   bij System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) 
   bij System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) 
   --- Einde van intern uitzonderingsstackpad --- 
   bij System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) 
   bij System.Net.HttpWebRequest.GetRequestStream() 
   bij System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) 
   bij Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.Proxy.CompoundTemplateWebService.GetDebuggingState(String debuggerSessionId, String lastLogMessageId) 
   bij Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.DebugObject.Start(Template template, Object debugItem, LoggingOptions loggingOptions) 

奇怪的是,我们并没有真正尝试访问外部服务器。至少,它看起来是这样的。也许我在 Tridion 的工作方式中遗漏了一些东西。我相当确定这是一个安全问题,但我不知道去哪里找。

最佳答案

我在 Nickoli 和 Nuno 的建议的帮助下找出了错误的问题。

当模板生成器尝试从网络中的某个位置运行时,会显示此错误,该位置无权访问代码。我还以为跟有关引擎.GetObject 方法,因为错误只会在运行该方法时出现。

最后代码中也有错误,但这与错误的递归方法有关。

关于tridion - 在复合模板中使用 C# 进行渲染时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10481611/

相关文章:

tridion - 组件中的 iframe 标记在发布时提供不完整的页面

Tridion 2009 SP1 : Image Thumbnails - How to publish the original image as well?

tridion - 如何在 SDL Tridion 2011 SP1 中将嵌入模式作为内容模式的下拉列表传递

Tridion 2009 SP1 : Custom Page that uses TDSE. 已发布的页面保留在发布队列中

Tridion Publishing 使用代码 (PublisherFramework)

tridion - 是否可以将值从 SDL Tridion 2011 GUI 扩展传递到事件处理程序中的 SaveEventArgs

Tridion UI - 预览未更新

tridion - 我可以使用 Tridion XM/New UI/2012 UI 拥有灵活/catchall 区域吗

Tridion RTF 文本选择