Skip to content
September 3, 2018 / kiranpatils

Sitecore 9 Architecture and Scaling Basics

Challenge:

Sitecore 9 comes with ~50 roles. Which is obvious in this Microservices era. Sitecore team has done good job documenting all the roles and scenarios as well providing videos to help us understand.

I wanted to document a quick reference, Which we can refer quickly. It helped me to connect the dots. Thought to share with you as well!

Solution:

Here you go:

While working on this document, Got connected with SUGNCR team. They were hosting their second in-person meetup. So, thought to present this topic there along with my friend – Brijesh Patel

Event was really great and nicely organized — It was really great to meet lot of Sitecore passionate people in-person.

Slides are as below:

Pre-Session survey results are as below:

As you can see ~30 people were there and average rating was 2.4. They had mid level knowledge about Storage Roles, Cloud Services and Scaling.

Our session’s goal was to increase this knowledge and that’s what has been done in above given slides. Due to some reason, we haven’t gathered post-sesion survey. But session feedback, Which we got from organizers is astonishing – Thank you so much audience!

Hope this helps!

Advertisements
July 21, 2018 / kiranpatils

Sitecore Troubleshooting Demos

Challenge:

Have been crafting on Sitecore since a decade and have came up with lot of unique Sitecore challenges.

Which I’ve been sharing with you via this blog, And have received good feedback from you — And I appreciate you for that. If you haven’t came across it yet. Then you can visit following links:

  1. https://sitecorebasics.wordpress.com/category/performance/
  2. https://sitecorebasics.wordpress.com/tag/troubleshooting/
  3. https://www.scribd.com/document/132658804/Sitecore-Troubleshooting-Path

While learning Debugging/Troubleshooting Tess’s blog helped me a lot. Especially Labs (You as well?!) :

https://blogs.msdn.microsoft.com/tess/2008/02/04/net-debugging-demos-information-and-setup-instructions/

Sine long time, I wanted to build something similar for Sitecore community. But most of the times being super busy, and at times being lazy [Happens with you as well!? ;-)]. But when I thought to present at SUGCON India I thought this is the best time to work on this idea! (If you couldn’t attend SUGCON India then you missed a great event — Everyone did a great job to make this happen first time at India. You can see great pictures here : http://www.sugcon.in/2018-pictures/)

I’m excited to share, What I have done with you. Which I already shared at SUGCON India and SUGUAE events.

Solution:

You can get it from here : https://github.com/klpatil/SCbuggybits (Read Me file should help you to get started) This lab contains 3 Bugs in the form of 3 Labs. It will be fun to find it and fix it!

My Session slides are here : http://www.sugcon.in/wp-content/uploads/2018/05/Troubleshoot-Sitecore-Like-a-Ninja-Kiran-Patil-SUGCON-India-2018.pdf

My session video is here :

Give it a try and let me know what you think? You found new bug in your day to day life, And would like to add it scbuggybits, I encourage you to do so!

Hope this helps you to fix your issues and let’s you go home on time! 🙂

July 21, 2018 / kiranpatils

TDS ProxyDisabler error with Sitecore 9

Challenge:

While working for my SUGCON Talk I was trying to setup Sitecore solution with TDS. I came across following error while doing Get Sitecore Items:

TDS-error.png

Solution:

My Sitecore version was 9.0.1. I did some Google search. But couldn’t find anything. So, thought to reach out hedgehog team and they suggested this:

The proxy disabler issue was fixed in one of the later versions of TDS 5.6. Upgrading to the latest version of TDS should fix the problem.

And that did the trick! After upgrading to TDS 5.6 it worked. Thanks to Hedgehog support team!

Hope this helps!

April 8, 2018 / kiranpatils

Fix for Database error during Sitecore 9 Installation

Challenge:

While installing Sitecore 9 for few of the exciting things I’m working on [Soon to be shared!] faced some issues. Which is obvious with any new things. I’m sure you as well. Not tried yet?! Then this quote is for you:

In a day when you don’t come across any problems, you can be sure that you are travelling in a wrong path.

https://quotefancy.com/quote/32294/Swami-Vivekananda-In-a-day-when-you-don-t-come-across-any-problems-you-can-be-sure-that

So, thought to write it down. With the goal that it helps someone, somewhere on this earth! [Might be on moon someday! :)]

I had to do couple of attemps to do Sitecore 9 Installation with same prefix. But at one point of time. It was stuck with this error:

Warning: The database containment option has been changed to None. This may result in deployment failure if the state of the database is not compliant with this containment level.

You are also facing the same? Then this post has fix for you!

Solution:

Here are the steps I did:

  1. Connected to SQL Server Management Studio and deleted databases which were with the prefix, which was trying to install.
  2. Configured Contained Database Authentication as per Installation guide’s chapter Prerequisites and Requirements [Why? Note from SC documentation “To enable SQL server to allow for the creation of users when using the Sitecore Install Framework, ensure that the target SQL Server is configured in a way that allows users and logins to be contained at the database level. To do this, set the contained database authentication server configuration option to 1 (on): “]
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO

Now, try again. And if all good. You should see your brand new Sitecore 9 instance up and running!

Good reads:

  1. https://chebalt.wordpress.com/2017/11/22/sitecore-9-installation-tips/
  2. http://blog.baslijten.com/gotchas-while-installing-sitecore-9-using-the-sitecore-installation-framework/
  3. https://docs.microsoft.com/en-us/sql/relational-databases/databases/contained-databases

Hope this helps!

September 28, 2017 / kiranpatils

Talking to inaccessible API using Membrane Service Proxy

Challenge:

This post is not directly related to Sitecore. But indirectly it is. Because Sitecore is what we do at Horizontal Integration

While working for one of our client, We had to call REST API Service built and hosted by them in their environment. Which is not yet live and accessible within their network only. We were doing development from local machine, connected to client network over VPN. But the service was inaccessible via VPN connection.

Due to some technical and security reasons. They were not able to make service accessible over VPN. It was accessible from one of their environment which we could access over VPN. So, Our Development team had to go on that box and do testing from there [Load Visual Studio, Code and Debug]. This was working. But slowing down our team. As we had heavy API Integration.

You are also facing similar issue? Or If not then interested to not how we crossed this brick wall? Let’s have a look at it:

https://i2.wp.com/www.azquotes.com/picture-quotes/quote-the-brick-walls-are-there-for-a-reason-the-brick-walls-are-not-there-to-keep-us-out-randy-pausch-35-67-71.jpg

Solution:

Pictorial representation of challenge and solution

I thought to draw an image, Which helps you visualize overall challenge and solution. Main pointers are:

  • A – Call to REST API Service from Developer machine was failing via VPN
  • B – Call to REST API Service was working from QA/UAT Machine [Within their network]
  • C – We installed Proxy Service on QA/UAT which contacts REST API Proxy and from Developer machine [Connected over VPN] calls Our proxy service rather than REST API Service

So, as you can see to solve this challenge. We configured proxy on QA/UAT Box. When we did an initial search we found the lot of great options. But it involved heavy installation and configuration. We were looking for something light weight. Which can be configured without lot of installation and configuration.

And we found this : http://www.membrane-soa.org/service-proxy/

Quickstart Guide : http://www.membrane-soa.org/service-proxy-doc/4.4/rest-quickstart.htm

It is JAVA Based Application. So, make sure you have JAVA Installed. And ensure Environment Variables are configured properly. As I took sometime to make it work. Here are my steps:

  1. Follow steps 1-3 from Quickstart Guide
  2. Keep it under c:\ [You can keep wherever you need to have it]
  3. set environment variable – MEMBRANE_HOME – <PATH TO YOUR MEMBRANE PROXY FOLDER]
  4. Do Step 4
  5. You are all set!
August 31, 2017 / kiranpatils

Sitecore TDS Classic Deployment over HTTPS

Challenge:

In case if you are using TDS. You know that it simplifies Development and deployment a lot. [If you are not — Then I strongly recommend — Read more Why : https://hedgehogdevelopment.github.io/tds/chapter1.html#why-tds-classic-works]

I have been lucky enough to configure it for lot of projects to make it deployment process smoother — Especially with TeamCity. Recently, I was doing it for one of the project where Target server works over HTTPS only. If you know internals of TDS Classic – It uses .asmx service as connector to do lot of magic.

When we tried to integrate it we faced following error:

“D:\\Project.Core.scproj” (default target) (15) ->
(InstallSitecoreConnectorFilesWithRecycle target) ->
C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets(478,5): warning : Server responded with Could not establish trust relationship for the SSL/TLS secure channel with authority ‘HOSTNAME’. [D:\\Project.Core.scproj]

Tried to search it over Web. But couldn’t find anything useful. So, I thought will write so it appears for you when you search next — Yes, You are facing same problem? Then this post have a solution. Which might work for you.

Solution:

I thought to check with \Hedgehog folks and I really like their support team – Very prompt, Very sharp and super helpful. I got connected with Kliment Klimentov. And he/she had been super helpful related to this issue.

  1. If you have installed Valid SSL Certificate then you no need to do anything
  2. But as we were trying to deploy on lower environment – DEV/QA/UAT — Where we were using IIS Dev Certificate
  3. We got following steps from TDS Classic Support team

You can create a self-signed certificate with correct certificate chain installing makecert and running the following commands:
//this will create the Root CA (if the company is called Test Company, and the subject key is sitecorecert):
cd C:\Program Files (x86)\Windows Kits\8.1\bin\x64
makecert.exe -n “CN=Test Root CA,O=Test Company,OU=Dev,L=Sofia,S=SF,C=BG” -pe -ss Root -sr LocalMachine -sky sitecorecert -m 120 -a sha256 -len 2048 -r
//this is for the certificate itself (if the website has a binding for sitecorecert and the root CA created in the previous step is called Test Root CA):
makecert.exe -n “CN=sitecorecert” -pe -ss My -sr LocalMachine -sky exchange -m 120 -in “Test Root CA” -is Root -ir LocalMachine -a sha1 -eku 1.3.6.1.5.5.7.3.1

Which to be honest, I got confused. Not because of steps. But because my lack of knowledge on this Certificate things. So, read some basics. And tried to break this steps in more simplified manner and thought to share my learnings with you:

My few of the questions were — Okay this steps needs to be done on server then what should be done on client? How to map certificate with site? And so on..

Basically, You need to do Self-Signed Certificate related configurations on both Buid Server [You can also call it as Client] and Web/App Server [Server]

Web/App Server

New-SelfSignedCertifcate -DnsName “YOURHOSTNAME”

  • Once done — Open MMC and Add Certificated Snap-In and Export your newly created Certificate [I Was able to find it under “Intermediate Certification Authorities” | “Certificates”]

  • From Site Binding — Use this newly self-signed certificate
  • Visit website and you should be good!

Build/Client Server

  • Copy exported .cer file from Server to Build/Client server [From wherever you were getting error]
  • Right click on Certificate and select Install Certificate
  • When you are on step to select Certificate Store, Make sure you select “Trusted Root Certification Authorities”

  • That’s it!

Have a happy and smooth deployment — Go home with smiling face! 🙂

Update : 04-Nov-2017

Recently solved this same challenge using different appraoch. So, thought to share with you.

  1. We were making our site to be always on HTTPS. [Read : http://www.zdnet.com/article/google-tightens-noose-on-http-chrome-to-stick-not-secure-on-pages-with-search-fields/%5D And we were using UrlRewrite rule to redirect all requests on HTTPS
  2. This affected our TeamCity and TDS Automatic deployment
  3. To fix this, We thought to install multiple [QA and Prod] SSL Certificates on all environments.
  4. But then we had Eureka moment! Where we were fine to do TDS Sync over HTTP.
  5. And this is how we have done it. Added following rule in Url Rewrite which ignores TDS Service
<!--Ignored SSL for TDS-->
  <rule name="TDS Ignore"  stopProcessing="true">
    <match url="^_dev/tdsservice.asmx$" />
    <action type="None"/>
  </rule>

 

August 31, 2017 / kiranpatils

Speed up project load time for Helix and TDS based Solution

Me and my colleague have been talking and we were noticing VS Hang during branch switch for one of our Helix based solution. Which has the lot of TDS Projects. We noticed when we switch branch. TDS Code generation starts code generation. Which Technically we don’t want. We want it when we do some item level changes. If you are also noticing similar challenge. Then TDS Classic team has solution for you, Which you might have not been aware/thought of.

Go to Visual Studio – Options and from here – You can configure it as per your need. And it will be persisted across all Visual Studio Instances as it is Global setting.

Read more : https://hedgehogdevelopment.github.io/tds/chapter4.html “TDS Classic Options Window”

%d bloggers like this: