0

I am using the Core Service (SDL Tridion 2013) to retrieve the entire publication list.

Below is my code:

public XmlDocument GetPublicationList()
{
    XmlDocument publicationList = new XmlDocument();
    using (SessionAwareCoreServiceClient client = new SessionAwareCoreServiceClient(binding))
    {
        Logger.Write(string.Format("Core Service is ready  {0} ", client.ToString()), "CoreService", LoggingCategory.General, TraceEventType.Information);
        PublicationsFilterData filter = new PublicationsFilterData();
        XElement publications = client.GetSystemWideListXml(filter);
        Logger.Write(string.Format("Get Pulication list"), "CoreService", LoggingCategory.General, TraceEventType.Information);
        publicationList.Load(publications.CreateReader());
    }
    return publicationList;
}

This code is throwing Access denied error:

Access is denied for the user NT AUTHORITY\NETWORK SERVICE.
  Component: Tridion.ContentManager.CoreService Errorcode: 770 User: NT AUTHORITY\NETWORK SERVICE  StackTrace Information Details:
   at Tridion.ContentManager.Security.AuthorizationManager.LoadAccessToken(String userName, IEnumerable`1 mappedGroupUris, IEnumerable`1 claimSets)
   at Tridion.ContentManager.Session..ctor(IEnumerable`1 claimSets)
   at Tridion.ContentManager.CoreService.CoreServiceBase.get_CurrentSession()
   at Tridion.ContentManager.CoreService.CoreServiceBase.GetSystemWideListXml(SystemWideListFilterData filter)
   at SyncInvokeGetSystemWideListXml(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Tridion.ContentManager.CoreService.CoreServiceInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
3

The context in which you application lives (likely web based on the user) is running as user NT AUTHORITY\NETWORK SERVICE.

This user is not configured within SDL Tridion as an allowed user.

Either try running the Core Service call as a valid SDL Tridion user, or add NT AUTHORITY\NETWORK SERVICE as a user within SDL Tridion.

As Saurabh says, this post should help https://stackoverflow.com/questions/12044338/tridion-coreservice-authentication-impersonation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.