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:
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.
- Extract the zip Sitecore Publishing Service 1.1.0.zip to a folder – lets say C:\inetpub\wwwroot\sitecorepublishing
- 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.
- Update the hosts file.
- 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”.
- 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
With this Step, installation of Sitecore Publishing Service is complete.
Next, lets configure the Publishing Service to use it with our Sitecore Instance.
- Open a Command Prompt as an Administrator role, and go to our location C:\inetpub\wwwroot\sitecorepublishing
- Write the command “schematool.exe list” — This will list the databases we just configured in the 5th step above.
- Now, let’s upgrade our database schemas using the command “schematool.exe upgrade”
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.
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
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! 🙂
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
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.
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.
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?
I was able to fix the issue by installing ASP.NET Core Server Hosting Bundle.