October 28, 2024

Dear Readers,

Thank you for the overwhelming response on my first post in the series on Sitecore 8.2  I really appreciate you all taking time and reading the post and at the same time sharing it and giving me feedback — it energizes me to write more. Oh! Did you say you missed the previous post? No worries, its here for you basics of Sitecore Publishing Service.

In this post, lets setup and configure the Sitecore Publishing Service.

As we know, that Sitecore Publishing Service is an add-on to the Sitecore environment, its quite understandable, that we need to configure 2 things, first the add-on service and second something in Sitecore application which links to the Sitecore Publishing Service. This leads us to downloading the two parts of Sitecore Publishing Service: The Service and the Sitecore Module for Service.

Download:

  1. Sitecore Publishing Service
  2. Sitecore Package

If you get an error, visit the following link and login to the Developer Portal. After downloading the above two from Sitecore Developer Portal, lets install and configure the Sitecore Publishing Service. But before that, lets install an instance of Sitecore 8.2, using anything that you like — my preference — SIM (Sitecore Instance Manager).

Installing the Sitecore Publishing Service:

We can install the Sitecore Publishing Service in two ways, manually – the way we host any website on IIS or using a PowerShell script. But here, lets discuss regarding the usual manual installation.

  1. Extract the zip Sitecore Publishing Service 1.1.0.zip to a folder – lets say C:\inetpub\wwwroot\sitecorepublishing
  2. Open the IIS Manager and create a new website in IIS and point it to the above folder. Let’s name the site sitecore.publishing and add the binding hostname as sitecore.publishing as well. iis-configuration
  3. Update the hosts file.
  4. Next, go to Application Pools in IIS Manager and open the Basic Setting of the corresponding App Pool. Make sure that the .Net CLR version is set to “No Managed Code”.app-pool
  5. In the Sitecore Publishing website folder (for our current case, C:\inetpub\wwwroot\sitecorepublishing) go to the location \config\global and create a new file with name sc.connectionstrings.xml connection-strings-publishing-service

With this Step, installation of Sitecore Publishing Service is complete.

Next, lets configure the Publishing Service to use it with our Sitecore Instance.

  1. Open a Command Prompt as an Administrator role, and go to our location C:\inetpub\wwwroot\sitecorepublishing
  2. Write the command “schematool.exe list” — This will list the databases we just configured in the 5th step above.list-of-databases
  3. Now, let’s upgrade our database schemas using the command “schematool.exe upgrade”upgrading-the-databases

Mmmm.. Now this step made me wonder, as to why this step and what changes does it make to my databases? So, my curious self went to SQL Server management studio and checked the databases and compared them with Sitecore 8.2 Plain Instance database.

tables-comparison

Does that solve the question in your mind, as to why is Sitecore Publishing Service faster? Well, it communicates directly with databases with no other Sitecore Layers in between — Just read the manifests and execute the steps — Separation of Concerns you know!

So with this change, even our databases are ready for Sitecore Publishing Service to start.

Lets check whether all our installation and configuration steps are done well or not.

To check, we’ll open http://sitecore.publishing/api/publishing/operations/status and it should return a JSON result { “Status” : 0 } as its response. If the response is anything other than this, its good to check the Publishing Service Logs.

Once the publishing Service is installed and up and running, we’ll now install Sitecore package in our instance, to connect to the Publishing Service. This installation is very simple and similar to any Sitecore Package installation. The important portion comes after the installation – as a Post Installation Step — i..e in the Sitecore.Publishing.Service.config, we’ll update the PublishingServiceUrlRoot to the URL of our Sitecore Publishing Service — in our case http://sitecore.publishing

post-installation-step

With that, we are all set to use our newly installed Sitecore Publishing Service with the current Sitecore instance.

Try it out.

Happy Publishing and Happy Sitecoring! 🙂

5 thoughts on “Setting up Sitecore Publishing Service

  1. Hi, Thanks for the information really useful.

    We are looking into this at the moment, as this speeds up the publishing times. Do you think this would cause more or less SQL network load though.

    thanks

    Adam

    1. Adam,

      Great Question!
      According to me, if you have the machine configurations as per the best practices suggested by Sitecore — like say 16GB or more RAM, disk space 40 GB plus etc, then I don’t think it should be a problem.
      But to be on a safer side, I would suggest a couple of things to do before you go ahead with this change.
      1. Contact Sitecore Support for better idea on this question of yours — They are experts and will give you the best answer to this question.
      2. Try moving to Publishing Service on your local environment with a copy of your production database to check things with your live data.

      I am sure you will get answers to your questions with the above two things.

  2. Hi,

    When I run schematool.exe list command I am getting bellow error.

    Unhandled Exception: System.ArgumentNullException: Value cannot be null.
    Parameter name: logger
    at Microsoft.Extensions.Logging.LoggerExtensions.LogError(ILogger logger, String message, Object[] args)
    at Sitecore.Framework.Publishing.Data.Tools.Program.PrintErrors(Exception ex) in C:\TC\BuildAgent\work\c9f151fb6c9b4087\src\Sitecore.Framework.Publishing.Data.Tools\Program.cs:line 62
    at Sitecore.Framework.Publishing.Data.Tools.Program.Main(String[] args) in C:\TC\BuildAgent\work\c9f151fb6c9b4087\src\Sitecore.Framework.Publishing.Data.Tools\Program.cs:line 41

    What I am doing wrong.

  3. Hi,

    On browsing http://sitecore.publishing/api/publishing/operations/status, I am getting below error:

    HTTP Error 500.19 – Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

    Module IIS Web Core

    Notification Unknown

    Handler Not yet determined

    Error Code 0x8007000d

    Config Error

    Config File \?\C:\sitecorepublishing\web.config

    What am I missing?

Leave a Reply

Your email address will not be published. Required fields are marked *