Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete the object through tridion core service

I am not able to delete the object through core service.

I am getting object reference not found error. I am able to create and get the object but delete functionality fails.

I am using this code:

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

here's the error:

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

I am using above code only and pass the tcm URI

Error Code : {System.ServiceModel.FaultCode}

like image 629
Shekhar Gigras Avatar asked Oct 23 '22 11:10

Shekhar Gigras


1 Answers

I had the same error and it was related to UGC. I disabled UGC (commented out the model and editor in the config and the eventsystem.dll from ugc), restarted the server and everything worked.

Check the 'Tridion' Windows Event Log on the Content Manager Server. There is probably an error related to UGC. I think you need to contact CS to fix this, since the error is in the Eventsystem dll from UGC

like image 67
Albert Romkes Avatar answered Oct 26 '22 21:10

Albert Romkes