Posts

Sitecore MCS Custom Backup Failed Due to Size Limit

Image
Sitecore Managed Cloud Service provides the default setting for the Custom Backup of our CD instance. In your environment, you can see all default settings from the Backup Action tab. As our custom backup had a limit of 10GB with a linked database of 4 GB so due to the size of the logs and other files we are sometimes getting failed custom backups. Automatic vs. Custom Backups Hence regarding your backup failures, that is mostly due to " The website + database size exceeds the 10 GB limit ". I did a quick check and it seems that the folder in site/wwwroot/App_Data/Logs is using up to 6GB of available space. To view the file usage of each folder, you can go to KUDU, open the PowerShell console, and run this command in the WWWroot: Solutions: Regarding the solution to the failed backups and why Sitecore prefers the use of Custom Backup as it supports. It is due to Partial backups being supported for custom backups. Partial b

Error: Method Through Reflection is Not Allowed after Applying Sitecore Hotfix

Image
Recently, Sitecore security bulletin SC2023-003-587441 addresses Critical (582720) and High (584731) severity vulnerabilities in Sitecore software and provides the cumulative hotfix for the same. I have applied this hotfix in my solution and deployed it, but I have encountered the following error while publishing the Sitecore Items. If you are looking for how to install the Sitecore Cumulative hotfix OnPrem and PaaS instances, see the blog post: Sitecore Cumulative Hotfixes Installation on OnPrem and PaaS Solution: This Security Hotfix might add a security layer that prevents the execution of unexpected methods through reflection. As I have customized the publishing method for Sitecore items, I am getting this issue while publishing the Sitecore items. Go to the path " \App_Config\Sitecore\CMS.Core\ " and open the " Sitecore.Reflection.Filtering.config " file. Add the method name to the " Sitecore.Reflect

Sitemap and Robots in Sitecore Multisite

Image
In the continuation of my previous blog Steps to be Performed after Multisite Configuration, I am going to discuss two important functionalities in terms of Google search crawling ranking and every website core functionality which are Sitemap and Robots txt implementation.  Create a new Template with two fields Sitemap and Robots. Inherit the above template on the Home page template of both Site nodes. Create a patch file: This patch file will have one pre-processor to allow the URL extension for XML and Txt files and another processor in the httpRequestBegin pipeline to serve Sitemap and Robots txt files. Create a class in your project for the custom processor and use the below code Deploy your application and browse pages: Website-a.com/sitemap.xml Website-b.com/sitemap.xml Website-a.com/robots.txt Website-b.com/ robots.txt If you want to implement the same functionality using ASP.N

Sitecore - Value Cannot Be Null Parameter Name Key

Image
After upgrading the solution to Sitecore version 10.2, I have started facing the Value that cannot be a null error. More details log and error you can find below: After investigating this issue, I have found that this is a known issue in Sitecore and Sitecore described the solution here Retrieving the child items of resource items is not thread-safe . But as we were on Sitecore XM instead of the XP version, so will it work for XM? Yes, the cumulative hotfix works for XM as well, so do not be confused with it. Note: This hotfix is a Cumulative hotfix and does not use the installation wizard to install it. Such hotfixes are not intended to be installed using the Installation wizard. Instead, you need to refer to the following articles describing by Sitecore, how to install the hotfixes for OnPrem and PaaS instances: Install a Sitecore XP pre-release using SIF Deploy a Sitecore XP pre-release to a PaaS solution But I h

Sitecore Cumulative Hotfixes Installation on OnPrem and PaaS

Image
In this blog post, I will discuss how to install the cumulative hotfix on Sitecore OnPrem and PaaS instances. For example, Sitecore provided the Cumulative hotfix for Sitecore XP 10.2  and it's available for both XM and XP 10.2 instances. Usually, to install the hotfix we use the Sitecore installation wizard, but such cumulative hotfixes are not intended to be installed using the Installation wizard. Instead, we need to refer to the following articles describing how to install the hotfixes for OnPrem and PaaS instances: Install a Sitecore XP pre-release using SIF Deploy a Sitecore XP pre-release to a PaaS solution My application has been deployed with Sitecore Managed Cloud Service (Azure PaaS) . I have found that there is less instruction about how to install the cumulative hotfix, so I decided to install it via project solution. Solution: Create one separate project in your solution named SitecoreHotfix

Log Search Alert Rule Appeared in Azure Portal

Image
Over the weekend suddenly Log Search Alert Rule appeared on our UAT and PROD MCS Azure account dashboard and it’s not easy to find the actual app services. It has never existed before on Portal. These resources always existed but were hidden on the portal, to see it in the portal we had to check the "show hidden types" checkbox. But now these resources are visible by default, it looks like a recent change on the portal. Azure support has confirmed that this is the recent change on the portal. The Azure team has made rules and action groups a first-class asset, official documentation will follow. We are still in contact with them on the matter of question if it's still possible to hide them as before. The solution is adding specific tags to resources and then filtering by the tags in the Azure portal, below are the steps describing how to do it: Assign Tags for the resource (Alert rules/Action Group), filter the Type with a t

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

Sitecore.SessionProvider.Redis.StackExchangeClientConnectionAsync

Image
We had encounter the following error frequently in our application. Problem Id: System.NullReferenceException at Sitecore.SessionProvider.Redis.StackExchangeClientConnectionAsync+<EvalAsync>d__22.MoveNext Message: Object reference not set to an instance of an object. Exception type: System.NullReferenceException Failed method: Sitecore.SessionProvider.Redis.StackExchangeClientConnectionAsync+<EvalAsync>d__22.MoveNext Call Stack: StackExchange.Redis DLL version: 2.1.58 The application is deployed on Sitecore Managed Cloud Service Azure PaaS and uses Redis app service . I have applied the below fixes as well as the following articles but the issue is not resolved: Increased the min worker thread pool to 100 Increased polling Interval to 60 Tuned Redis Configuration as described here: Tuning Redis Configuration Settings Added sslprotocols=tls12 to Redis connection string Sitecore PAAS Redis Exce

Sitecore Media in Database Vs. File Directory Vs. Blob Storage

Image
We understand that Sitecore provides an option to store media library assets either in DB (defaults to DB) or in the filesystem or we can store it in the Azure Blob Storage. But the question is what is the best option from all three options and why? Here in this blog, I will discuss the pros and cons of all three options and help you to find the best possible option. 1. Sitecore Database: By default, Sitecore provides this option while uploading the media items to the Sitecore Media Library. If you will delete the Media item from the library, it will be deleted from the Sitecore database and Sitecore also provides a database clean-up tool Cleanup database. 2. File Storage: To upload the media library assets (Image, Video, Pdf, etc) to the file storage you need to update the value of the following variable in the Sitecore. config file: <setting name="Media.UploadAsFiles" value="false" /> Set it to true. <setting name

Sitecore Technology MVP Journey 2023

Image
Getting the badge of Sitecore MVP the second time in a row particularly in Technology for me is one of them. My journey for Sitecore MVP begins in the Year 2019. I commenced with Sitecore Technology blogs , and actively participate in the Sitecore Stack Exchange Platform , Sitecore Slack Channel , and SUGCON public speaking. I am honored to be named Sitecore Technology MVP 2023 . I feel fortunate to be participating with a Sitecore Community, Technology, and Product. I am happy that my all efforts and contributions are recognized by Sitecore and Community. My next focus for this year would be: Exploring more in Sitecore Project including Personalize and CDP, Content Hub, and XM Cloud. Continuing with sharing and helping others in Sitecore Community. Participating in Sitecore MVP mentorship program. A big thanks to my family, colleagues, and Sitecore Team, and congratulations to all the Sitecore 2023 MVP award winners. Happy Sitecor