通过tridion核心服务删除对象

时间:2012-09-03 07:49:59

标签: tridion tridion-2011

我无法通过核心服务删除该对象。

我收到对象引用未找到错误。我能够创建并获取对象,但删除功能失败。

我正在使用此代码:

var client = new CoreService2010Client();
client.ClientCredentials.Windows.ClientCredential.UserName = Settings.UserID;
client.ClientCredentials.Windows.ClientCredential.Password = Settings.Password;
client.Open();
client.Delete(TCMURI);

这是错误:

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Tridion.ContentManager.CoreService.Client.ICoreService.Delete(String id)
   at Tridion.ContentManager.CoreService.Client.CoreServiceClient.Delete(String id)
   at TridionCoreService.Program.testing() in C:\WORK\My Work\TridionCoreService\TridionCoreService\Program.cs:line 125
   at TridionCoreService.Program.Main(String[] args) in C:\WORK\My Work\TridionCoreService\TridionCoreService\Program.cs:line 25

我只使用上面的代码并传递tcm URI

错误代码:{System.ServiceModel.FaultCode}

1 个答案:

答案 0 :(得分:3)

我遇到了同样的错误,它与UGC有关。 我禁用了UGC(在配置中注释了模型和编辑器以及来自ugc的eventsystem.dll),重新启动了服务器,一切正常。

检查Content Manager Server上的“Tridion”Windows事件日志。可能存在与UGC相关的错误。我认为您需要联系CS来解决此问题,因为错误发生在UGC的Eventsystem dll中