Skip to content
July 21, 2018 / kiranpatils

TDS ProxyDisabler error with Sitecore 9


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:



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


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.”

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!


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;

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

Good reads:


Hope this helps!

September 28, 2017 / kiranpatils

Talking to inaccessible API using Membrane Service Proxy


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:


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 :

Quickstart Guide :

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


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 :]

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.


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

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 : 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"/>


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 : “TDS Classic Options Window”

August 30, 2017 / kiranpatils

Sitecore Item Utility


Recently, We wanted to get few critical things done for one of our client before they Go-Live. We had a couple of weeks to get all those things done with minimal changes. [Normal scenario — Correct? ;)].

With that condition, We had to do bulk template change for 1000+ Media Items, as we added some functionality which was required in new template. We had following options:


They both are great solution for our challenge. Especially Sitecore Powershell. But If you see both need deployment/package install which has the lot of footprints and as I mentioned earlier, we wanted to have minimal changes before we Go-Live!

So, We thought we will build a simple aspx page [With CodeFile] So, It can be deployed without any App Pool Restart and once used tool can be deleted — Use and Throw. I’m sure you all must have built one/another tool like this. But once your Challenge was solved you struggled to find it. So, as I πŸ™‚ That’s why I thought to blog this!


This is how it works:

You can download code from here and modify it as per your need and if you think it can help someone on this earth — Please share your great work!


Just a note : It is CodeBehind. But It should be CodeFile. So, it works without compiled DLL and No App Pool Recycle will be caused by this deployment

I hope this saves some of your time as it did for us. And you have time doing things which matters the most!

Happy Coding! πŸ™‚

August 3, 2017 / kiranpatils

Integrating Cognitive Services to set ALT Tag during Image Upload


It is interesting – How this idea came up. Basically, was browsing Facebook page and while doing that – My Internet was slow and during image load process — I noticed an ALT Tag — Which had something like this and when Image got loaded. It had exactly same thing!


While this thing got stuck somewhere in mind. Came across following videos [Which I’m sure most of you as well]:

And that revoked the thought process. Especially — For those who are not as privileged as you and me to see the world. But through technology if it helps them visualize — That will help!

Then came across this link : [“Microsoft Cognitive Services let you build apps with powerful algorithms using just a few lines of code. They work across devices, keep improving, and are easy to set up. Try the Cognitive Services APIs for free.”] — This is really awesome – As For me impacting human lives and making it better using technology is the only thing which drives me in to this field. I’m sure for lot of you as well!

It provides the lot of services, which I recommend you to explore. But for this blog post, We only need : – You can try it out before you use it!

Tried few things and created simple Console application as per this doc :

And was impressed to see how it works — It just works! – My eyes lit up – And as you — I always think — How can I integrate this in Sitecore. And that’s how this blog post came in to this world!

Let’s see how — I have been able to integrate it with Sitecore!


You must have observed — Most of the site’s Media Library will have an empty ALT Tag. And it is not easy for someone to go and type such meaningful ALT Tag. Then I thought to use Cognitive Services to suggest us an ALT Tag and based on suggestion set that automatically in ALT Tag field. So, Content Authors/Editors, End users are happy – This is how it works:


As you do, I also did Quick search and tried to find is something similar already done. And found Mike’s blog : – Where he is extracting item name from path and setting it as an ALT Tag from getMediaCreatorOptions pipeline.

  1. I thought to alter his logic of getting ALT Tag instead of substring making an API call and setting it — Sounds easy, right? But my dear friend life is not as easy as it seems to be — After trying this out — I found that there is no way for me to access uploaded file or uploaded media stream 😦 — I tried to some options. But with no luck
  2. So, thought to try something else — And I tried item:created, item:saving, item:saved and in each of them I had the same problem. Was unable to get Media Stream
  3. It looks like when these events are getting called — It is creating particular media item and after that BLOB gets attached – I’m assuming this. Have asked Sitecore folks to clarify.
  4. Then finally, Thought to implement : uiUpload – Usually I avoid adding anything to ui* processors. As it will only be handled in UI scenarios and not programmatically scenarios. But I had no option and then I thought of YAGNI principle — I don’t need it now as this is my MVP [Minimum Viable Product]
  5. And here’s all the code you need for that — As I mentioned this is just kind of POC – Key and URL should come from Configuration, Code needs to be ironed out. Before it goes on production — And I will leave it up to you for brevity!

Let’s do our bit to make world better than we found it – Happy Coding! πŸ™‚

UPDATE 1 : Thanks Kamruz

After posting this — Kamruz mentioned something similar folks from Community has already done. It looks like I need to sharpen my Google Search Skills – It would have save sometime. But on a +ve side, I have been able to learn and share

%d bloggers like this: