我无法通过核心服务删除对象。
我收到未找到对象引用的错误。我可以创建和获取对象,但是删除功能失败。
我正在使用此代码:
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}
最佳答案
我有同样的错误,并且与UGC有关。
我禁用了UGC(从ugc中注释掉了config中的模型和编辑器以及来自ugc的eventsystem.dll),重新启动了服务器,一切正常。
检查Content Manager服务器上的“Tridion” Windows事件日志。可能是与UGC有关的错误。我认为您需要联系CS来解决此问题,因为该错误是UGC的Eventsystem dll中的错误
关于tridion - 通过Tridion核心服务删除对象,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12243872/