Delete the object using the tridion service

I cannot delete an object using the main service.

I get a link to an object not found error. I can create and get an object, but the delete function failed.

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 use only the code above and pass the tcm URI

Error Code: {System.ServiceModel.FaultCode}

+5
source share
1 answer

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

Windows Tridion Content Manager. , , UGC. , CS, , DLL Eventsystem UGC

+3

All Articles