6

I am getting the following error when clicking the Update Preview button after inline editing:

Authorization failed. Please make sure the proper username and password have been configured in the Publication Target.

The detailed error is:

Authorization failed. Please make sure the proper username and password have been configured in the Publication Target.

Component: Tridion.ContentManager.Publishing.PreviewService
Errorcode: 1003
User: NT AUTHORITY\NETWORK SERVICE

StackTrace Information Details:
   at Tridion.ContentManager.Publishing.PreviewService.ServiceImplementation.PreparePreview(ContentDeliveryService dataService, ConcurrentDictionary`2 renderedContent)
   at Tridion.ContentManager.Publishing.PreviewService.ServiceImplementation.Preview(IEnumerable`1 publishedItemsInfo, TcmUri publishingTargetId)
   at Tridion.ContentManager.Publishing.PreviewService.FastTrackPublishingService.Preview(IEnumerable`1 publishedItemsInfo, TcmUri publishingTargetId)
   at SyncInvokePreview(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.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.ProcessMessage11(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Is there anything I am missing? This error looks weird because in Web 8.5 we have no Publication Target setting for XPM.

3
  • I'm trying to understand a bit more details, 1. Is that environment upgraded from the previous version like Tridion 2013sp1 to web8.5? 2. Is it uses Topology manager publishing setup or legacy publishing setup? 3. Is it preview service configured correctly and registered with discovery service with correct authentication credentials?
    – Velmurugan
    Commented Mar 14, 2018 at 15:38
  • 1. It was a fresh web 8.5 installation 2. It uses Topology manager publishing setup 3. Yes [ { "Capability" : "com.sdl.web.discovery.datalayer.model.PreviewWebServiceCapability", "id" : "DefaultPreviewWebService", "lastUpdateTime" : 1521031947166, "uri" : "localhost:8083/ws/preview.svc" }, } ] Commented Mar 14, 2018 at 18:05
  • 1
    Please edit the Question instead of providing additional information in comments. Please also show how your CD Environment is configured in Topology Manager (Get-TtmCdEnvironment) Commented Apr 16, 2018 at 17:44

1 Answer 1

1

Try Troubleshooting the XPM issue by following steps:

  1. To ensure Installation done with correct Jars and version of the preview service and session-content services and register with discovery double check the port and credentials informations are correctly setup.
  2. To ensure the following config sections are present

In Preview Service side:

cd_stograge_config.xml - to ensure this following sections are present.

        <ObjectCache Enabled="false"/>

        <StorageBindings>
            <Bundle src="preview_dao_bundle.xml"/>
        </StorageBindings>
        <Wrappers>
            <Wrapper Name="SessionWrapper">
                <Storage Class="com.tridion.storage.persistence.JPADAOFactory" Id="sessionDb" Type="persistence" dialect="MSSQL">
                    <Pool CheckoutTimeout="120" IdleTimeout="120" MonitorInterval="60" Size="5" Type="jdbc"/>
                    <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                        <Property Name="serverName" Value="localhost"/>
                        <Property Name="portNumber" Value="1433"/>
                        <Property Name="databaseName" Value="SessionPreview"/>
                        <Property Name="user" Value="SessionPreview_User"/>
                        <Property Name="password" Value="xxxxxx"/>
                    </DataSource>
                </Storage>
            </Wrapper>
        </Wrappers>

cd_ambient_config.xml - to ensure this following sections are present

 <WhiteList>
        <IPAddresses>
            <Ip>0.0.0.0-255.255.255.255</Ip>
        </IPAddresses>
 </WhiteList>

<Cartridges>
    <Cartridge File="cd_webservice_preview_cartridge.xml" Category="SYSTEM"/>
</Cartridges>

In Session enabled Content Service side:

cd_stograge_config.xml - to ensure this following sections are present.

        <StorageBindings>
            <Bundle src="preview_dao_bundle.xml"/>
        </StorageBindings>
        <Wrappers>
            <Wrapper Name="SessionWrapper">
                <Storage Class="com.tridion.storage.persistence.JPADAOFactory" Id="sessionDb" Type="persistence" dialect="MSSQL">
                    <Pool CheckoutTimeout="120" IdleTimeout="120" MonitorInterval="60" Size="5" Type="jdbc"/>
                    <DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
                        <Property Name="serverName" Value="localhost"/>
                        <Property Name="portNumber" Value="1433"/>
                        <Property Name="databaseName" Value="SessionPreview"/>
                        <Property Name="user" Value="SessionPreview_User"/>
                        <Property Name="password" Value="xxxxxx"/>
                    </DataSource>
                </Storage>
            </Wrapper>
        </Wrappers>

cd_ambient_config.xml - to ensure this following sections are present

<WhiteList>
        <IPAddresses>
            <Ip>0.0.0.0-255.255.255.255</Ip>
        </IPAddresses>
    </WhiteList>
    <GloballyAcceptedClaims>
        <Claim Uri="taf:session:preview:preview_session"/>      
    </GloballyAcceptedClaims>
   <Cartridges>
    <Cartridge File="cd_webservice_preview_cartridge.xml" Category="SYSTEM"/>
    <Cartridge File="cd_webservice_preview_cartridge.xml"/>
</Cartridges>

<Cookies>
    <CookieClaim DefaultValue="true" Name="CookieClaim"/>
    <Cookie Type="ADF" Name="TAFContext" />
</Cookies>

In Web application side:

cd_client_conf.xml Cache is disabled

cd_ambient_conf.xml - to ensure this following sections are present

<ForwardedClaims CookieName="TAFContext">
    <Claim Uri="taf:session:preview:preview_session"/>
</ForwardedClaims>

<Security>     
    <GloballyAcceptedClaims>
        <Claim Uri="taf:session:preview:preview_session"/>
    </GloballyAcceptedClaims>
</Security>

In Java Web App: Enable the Ambient Data Framework by adding the following to your web.xml:

<filter>
  <filter-name>Ambient Client Filter</filter-name>
  <filter-class>com.sdl.web.ambient.client.AmbientClientFilter</filter-class>
</filter>

<filter-mapping>
  <filter-name>Ambient Client Filter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

In .NET Webapp:

Add the following inside the <modules> section inside the <system.webServer> section

<add type="Tridion.ContentDelivery.AmbientData.HttpModule" 
    name="Tridion.ContentDelivery.AmbientData.HttpModule" />

Refer to the documentation here

  1. To make sure to Add “Enable inline editing for content” TBB
  2. To ensure if CMS application is running in https then mandatory to run your web application also in https.
  3. To ensure to add the staging website URL in topology manager, in case if you are testing with your local system with source build for debugging then also ensure to add your localhost:port domain details to topology manager.
  4. To enable content service logs to debug level to see claim cookie forwards are appearing in the logs.
  5. To ensure preview service XPM Session Broker DB to have a Read and Write permissions to the session_db user.
  6. To ensure in XPM HTML Markup are correctly rendering in web app the HTML source
  7. To ensure with fiddler CMS XPM scripts are loading correctly
  8. If you press the Update Preview button then - you should be able to see the session details in the session preview DB tables.
  9. To ensure in the CMS Settings -> Inline editing -> Session Preview Settings -> Preview service is enabled.

enter image description here

I hope it helps.

2
  • After adding cartridges in cd_ambient_config of session enabled content service, My application stops working. I have checked the other settings are there in my config file - ERROR - Service unavailable Sdl.Web.Delivery.Service.ServiceUnavailableException: Service unavailable ---> Microsoft.OData.Client.DataServiceTransportException: Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8081 Commented Mar 15, 2018 at 10:26
  • Did you installed the correct session enabled content service from installation media? seems content service is down not started, not able to run it the port 8081. open the PowerShell script as administrator and go to session content service bin folder and then run the ./start.ps1 script this will give you the details of errors why it's struggling to start the service.
    – Velmurugan
    Commented Mar 15, 2018 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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