Posts

Showing posts from April, 2023

Monitor and Tune Cache on CD Server

Image
On the CM server, it's easy to monitor the Sitecore cache in CMS and we can tune it accordingly. It's under the Administration tool provided by Sitecore. You can access it directly from the URL i.e. {your-sitecore-instance}/sitecore/admin/cache.aspx OR browse it from the Administrative page. But on a Content Delivery server, access to the administrative pages usually is not available hence there is no direct option available to monitor Sitecore Cache for the CD server. In this blog, I will explain how to monitor cache tunning on a CD server. Go to the CD server and check the App_Data\diagnostics\health_monitor folder. You will get their file named CacheStatus.20230412Z.141522Z.html where 20230412Z.141522Z is a time stamp. (Sitecore saves a copy of the cache.aspx page every ten minutes) Note: Most of the cases you will get the file under the folder but in case you cannot find the file then you need to enable ...

Cross-origin Issue in Sitecore Multisite

Image
While working on the Sitecore multisite, I faced the following issue while accessing the API with website-B. This happens when you want to use your web API with another website in Sitecore multisite setup. Cross-Origin Resource Sharing (CORS) is a W3C standard that allows a server to relax the same-origin policy. When you use CORS, a server can explicitly allow some cross-origin requests while rejecting others. Sitecore provides CORS support for Web API services. You can configure CORS in three ways: Globally for all Web API services (configured in the Sitecore.Services.Client.config file). Using an API key. Using the EnableCors attribute. I have used the first option to solve my issue. You need to modify "Sitecore.Services.Client.config" at path {instance}/ \App_Config\Sitecore\Services.Client with registered origins. Create a patch file in the project and add the following section of code and allow origin...