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

Hen*_*ker 11 tridion tridion2009

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

导致问题的代码是:

StructureGroup SG = (StructureGroup)engine.GetObject("/webdav/pub/root/etc/etc...");
Run Code Online (Sandbox Code Playgroud)

"模板"构建器中的错误是:

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) 
Run Code Online (Sandbox Code Playgroud)

奇怪的是,我们并没有真正想要到达外部服务器.至少,这就是它的样子.也许我错过了Tridion的工作方式.我相当肯定这是一个安全问题,但我不知道在哪里看.

Hen*_*ker 5

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

当模板生成器尝试从网络中无法访问代码的位置运行时,会显示此错误.我认为它与engine.GetObject方法有关,因为错误只会在运行该方法时出现.

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