Surendra Sharma

Surendra Sharma

Search This Blog

Thursday, September 14, 2023

Authentication failed because the remote party has closed the transport stream

Sitecore Content Hub is a powerful tool for managing digital assets and content. When it comes to integrating Content Hub with your Sitecore instance, you may encounter some weird challenges. One of the issues that users may face is the "Authentication failed because the remote party has closed the transport stream" error. In this article, we will explore the causes of this error and how to resolve it.

 

The Scenario

Imagine you have a Sitecore instance running on Azure PaaS, and you've installed the Content Hub connector. Everything seems to be working smoothly – you can retrieve images and links from the Digital Asset Management (DAM) system and display them in Image and Rich Text fields. However, trouble arises when you attempt to use the "Insert DAM link" feature within the General Link field. Instead of successfully inserting a link, you encounter the perplexing "Authentication failed" error.

 

General link field error for Sitecore Content Hub
General link field error for Sitecore Content Hub

Initial Troubleshooting

Naturally, our first instinct is to check our credentials. We've logged into Content Hub in another browser tab, and there don't seem to be any issues with authentication for Image and Rich Text fields. The problem only arises when interacting with the General Link field as

 

Checking internal code

Digging deeper into the issue, we examine the code responsible for communicating with the Content Hub API. This line of code is executed exclusively when we use the "Insert DAM link" command within the General Link field which basically retrieves additional properties.

value = GetAdditionalPropertyValue(chKey, DAMHelper.GetEntity(long.Parse(result[Constants.SelectedAssetId])));

 

Suspecting TLS Issue

At this point, we might suspect a Transport Layer Security (TLS) issue, as TLS configuration can sometimes lead to connectivity problems. However, we verify that our development environment is configured to use TLS 1.2, eliminating TLS as the root cause.

 

Azure VNET to the Rescue

With conventional troubleshooting avenues exhausted, we turn our attention to our Azure Virtual Network (VNET) configuration. After reviewing our VNET traffic rules, we discover the key to resolving the issue. We open up the traffic for the Sitecore Content Hub URL at the Azure VNET level.

 

The Solution

To our relief, this Azure VNET setting proves to be the missing piece of the puzzle. Once we've made the necessary adjustments, the "Authentication failed" error becomes a thing of the past. The General Link field now functions seamlessly, and we can insert DAM links without encountering any connectivity problems.

 

Finally

Troubleshooting errors like "Authentication failed because the remote party has closed the transport stream" can be a complex process. It often requires a systematic approach to identify the root cause and find a solution. In this case, a careful examination of the code, consideration of TLS configurations, and ultimately, the adjustment of Azure VNET settings, resolved the issue.

By sharing this experience, we hope to assist others who may encounter similar challenges when using Sitecore Content Hub connectors. Remember that troubleshooting can be a learning opportunity, and persistence often leads to a successful resolution.

Monday, September 4, 2023

Troubleshooting Sitecore Content Hub Connector Authentication Issue with General Link Fields

Sitecore Content Hub Connector is a powerful tool that enables seamless integration between Sitecore and Content Hub. This integration allows content authors to easily access and manage digital assets from Content Hub within Sitecore. However, like any integration, it can encounter occasional issues. In this blog post, we'll discuss a specific problem some users have faced: an authentication error when working with General Link fields in Sitecore.

 

The Scenario:

You've set up Sitecore 10.3 on Azure PaaS and successfully integrated it with Sitecore Content Hub using PowerShell installation script. Everything seems to be working fine like RichText and Image field able to get images from Content Hub successfully. But while using the "Insert DAM Link" option within a General Link field, you encounter an error message that says, "Unable to authorize with the specified credentials."

 

authentication error
Authentication error

Troubleshooting the Issue:

Let's walk through the steps to diagnose and resolve it.

Review Connection String:

The actual Content Hub user password is "123456789$ASDfghjkl", but when I checked connection string, I notice that the password for the Content Hub user is truncated, like "123456789$". This "$" sign in the password can be the root cause of the problem.

Password Correction:

To resolve this issue, simply correct the password in your connectionstring.config. Change it to "123456789$ASDfghjkl " or whatever your actual password is without the "$" sign.

Root Cause:

PowerShell script have a problem with "$" sign. PowerShell script can truncate your password and update your ConnectionStrings.config file with wrong password. So need to update connectionstring.config file manually with correct and full password.

Testing:

After making this correction, test the "Insert DAM Link" functionality in the General Link field again. You should no longer encounter the authentication error.

Lessons Learned:

Never keep $ sign in password while installing and running Powershell scripts for installing Sitecore Content Hub Connector. 

Thursday, August 31, 2023

Connection to Your Rendering Host Failed with a Body Exceeded 2MB Limit

In the ever-evolving landscape of digital experiences, Sitecore JSS (JavaScript Services) combined with Next.js has emerged as a powerful duo for building headless websites. This approach provides flexibility, scalability, and performance. However, as with any technology, challenges may arise. 

In this blog post, we'll delve into one such challenge: the "Connection to Your Rendering Host Failed with a Body Exceeded 2MB Limit" error and how to tackle it effectively.

Understanding the Error

We have deployed our Next.js app on Azure Web App and we started to get the “Connection to your rendering host failed with a Body exceeded 2mb limit error. Ensure the POST endpoint at URL https://mynextjs-sitecore-test.azurewebapp.net/api/editing/render has been enabled” error. Its typically occurs when a request made to the Sitecore rendering host exceeds the predefined request size limit. This limit is set at 2MB by default to prevent excessively large requests from overwhelming the server and causing performance issues.

When building a Sitecore JSS-based headless website with Next.js, it's common to transfer data between the front end (Next.js) and the back end (Sitecore) using API calls. These API calls may involve sending large payloads, especially when dealing with extensive content or complex data structures.

Solutions

Once you've diagnosed the issue, it's time to implement a solution. We try to solve it in lots of 
different way, but ultimately the solution that work for us is

• Open “\src\pages\api\editing\render.ts” file and change size from 2 MB to 50 MB as

export const config = {
api: {
bodyParser: {
sizeLimit: '50mb',
},
responseLimit: false,
},
};

• Open “\src\pages\api\editing\data\[key].ts” file and change size from 2 MB to 50 MB as

export const config = {
api: {
bodyParser: {
sizeLimit: '2mb',
},
responseLimit: false,
},
};

• Build and deploy your application, it should work now.

I hope this trick may solve your problem as well. Happy coding!

Saturday, August 26, 2023

Recap of SUGCON India 2023


The stage
The Stage

Recap of SUGCON India 2023: A Grand Celebration of Sitecore Excellence

Date: August 24-25, 2023

Venue: The Grand, New Delhi


Hotel The Grand


The Sitecore community in India witnessed an exhilarating two days at the SUGCON India 2023 conference, held at the prestigious venue The Grand in New Delhi, on August 24th and 25th. For those who couldn't make it to this grand event, here's a recap of the key highlights and takeaways.


A Phenomenal Start with 150 Registrations

Day 1 of SUGCON India 2023 got off to an electrifying start as the registration count soared to an impressive 150 participants. This enthusiastic response underscored the immense interest and anticipation that surrounded this year's conference. It's clear that Sitecore enthusiasts were eager to be a part of this remarkable event from the very beginning.


A Busy Morning of Registration, Training, and Certification

Day 1 of SUGCON India 2023 commenced at 8 AM with a flurry of activity as attendees, both participants and speakers, arrived at The Grand, New Delhi. Registration desks were buzzing with anticipation as 150 eager individuals geared up for two days of Sitecore excellence.




Registration and Differentiated Access

Notably, the conference organizers had made provisions for different coloured badges to distinguish participants from speakers. I proudly donned my speaker's badge, knowing that I would be contributing to the wealth of knowledge sharing at the event. I came at around 11 AM and done with my registration and received my badge.



Paid Training: "Introduction to XM Cloud Pages"

For those looking to kickstart their SUGCON experience with in-depth training, the day began with a paid training session, "Introduction to XM Cloud Pages" running from 8 AM to 10 AM.




Sitecore Certification Exam Opportunity

Simultaneously, an opportunity for Sitecore certification exams was available from 10 AM to 12 PM. (Its fees was I think $50 or $60). Although I had opted not to participate in the certification exam this time, it was a golden chance for attendees to validate their Sitecore expertise and add an esteemed certification to their portfolio.

Somebody was asking for second chance as he was unable to clear this exam this time 😉


First Session: "Digital Experience is a Team Sport!" by Pieter Brinkman

After a delightful lunch break, attendees reconvened to dive into the heart of SUGCON India 2023's technical sessions. My first session of the day was a true highlight: "Digital Experience is a Team Sport!" presented by none other than Pieter Brinkman (The Tallest Guy).

In this captivating presentation, Pieter Brinkman shed light on Sitecore's visionary perspective regarding the future of Digital Experience Platforms (DXPs). The central theme revolved around the concept of a composable DXP, one that adapts to the ever-evolving digital landscape. It was a testament to Sitecore's commitment to innovation and staying ahead of the curve.

What stood out most was Sitecore's recognition of the significance of embracing a team-oriented approach to crafting compelling digital experiences. Whether you're a business leader, a marketer, an IT professional, or a developer, Sitecore's vision is unwaveringly focused on meeting the unique needs of every team member.

It was well crafted presentation. One can easily find Pieter from the crowd of 150 people as he was the tallest guy in the town.



Second session "Implementing Sitecore Search" by Rob Earlam

In this session Rob Earlam (The next Santa) explained how they implemented Sitecore Search on Developer Portal. Rob gave an overview of the project and the different learnings on Federated Search, Search Widgets, Search Configuration, Eventing & Analytics, React SDK, Challenges Faced

He walkthrough the main features of Sitecore Search and discuss some of the challenges faced to help audience with any future implementation issues they might face.

He also explained the variety of different Index Sources that have been configured, including a walkthrough of the different configurations required to pull in a selection of diverse content locations.

Some people are debating that Rob will be a part of the next Sitecore Santa Series Season on Sitecore Youtube channel😉.



3rd session Pure lightweight Headless CMS - Sitecore Content Hub One with GenAI by Marvin Glenn Lacuna


Following the main session, the conference continued with three concurrent sessions held in different breakout rooms. These sessions were:

  • Introduction to Sitecore CDP

  • Pure Lightweight Headless CMS - Sitecore Content Hub One with GenAI

  • Elevate Your Sitecore Solution: Migrating from MVC to Headless for Unparalleled Agility

I chose to attend the session led by Marvin Glenn Lacuna, where he provided comprehensive insights into the features of Content Hub One.

Marvin explained that Content Hub One represents a cloud-native, Software as a Service (SaaS) solution—a lightweight Headless Content Management System (CMS). It leverages Content Hub technology while maintaining its unique user interface and APIs. This platform is tailored for tech-savvy teams seeking rapid omnichannel experience development.

In addition to detailing the platform's capabilities, Marvin shared the forthcoming six-month roadmap for Content Hub One's development and exciting upcoming features.

The highlight of Marvin's session was a live demonstration where he invited attendees to scan a QR code, granting him access to real-time analytics for the application. This demonstration application is publicly accessible on the Sitecore Github account.

What truly resonated with the Indian audience was Marvin's choice of examples—cricket legends Sachin Tendulkar and Virat Kohli. The fact that people in the regions like Singapore and the Philippines follow cricket was a delightful revelation.

I hope BCCI is hearing that as their next Cricket tournament place.



The day's agenda included a coffee break at 4 PM, providing an ideal opportunity for reconnecting with former colleagues and fellow Sitecorians. It was a time for networking and sharing experiences, enriching the overall conference experience.




4th Session “Weddings in the Cloud with Sitecore Connect!” by Sandeep Bhatia and Ankit Joshi

Once again, there were three simultaneous sessions held in separate breakout rooms, namely:

  • Weddings in the Cloud with Sitecore Connect!

  • Sitecore Discover in Action: Live Showcase of AI-Powered Hyper-Personalization

  • Complete your composable story with Sitecore Ordercloud.

My choice was the session titled "Weddings in the Cloud with Sitecore Connect!" facilitated by Sandeep Bhatia and Ankit Joshi.

During this session, Sandeep and Ankit elucidated the concept of Warkato which is now Sitecore Connect. They delved into why businesses find Sitecore Connect indispensable for their operations.

Moreover, a live demonstration was conducted, providing an overview of the Sitecore Connect portal. Attendees gained insights into the fundamental building blocks of Sitecore Connect, which include connections, recipes, triggers, and actions.

Sandeep and Ankit showcased how Sitecore XM Cloud, with the assistance of webhooks, can be seamlessly integrated with Sitecore Connect, facilitating the creation of items in Content Hub One.

These two guys always delivering session together as a perfect pair. Happy wedding !!!




5th Session Beyond Buzzwords: Composable Tech and Generative AI for Real by George Smith, Sheetal Jain

During the fifth session titled "Beyond Buzzwords: Composable Tech and Generative AI for Real," led by George Smith and Sheetal Jain, Sheetal Jain was at his best in the session.

Sheetal Jain was in his element as he elucidated the art of designing one's own physical product and swiftly bringing it to life within a tight timeframe.

During a remarkable demonstration, he showcased an impressive application where a commerce store was developed in an astonishing six weeks (if this is indeed the case, hats off to the team!). This store was hosted on Vercel, utilizing a versatile suite of composable products that included Content Hub Operations, Content Hub DAM, OrderCloud, and DALL-E. This ingenious setup empowered individuals to create custom T-shirts and promptly launch them as marketable products with ease.

Furthermore, Sheetal shared his personal journey, evolving from a developer to the esteemed position of CTO. He also highlighted his role in steering a successful training program that transformed backend developers into Next.js developers—a transition that could ultimately lead them to becoming full-stack developers. Sheetal's core message revolved around the importance of customers expressing their needs concisely, with technologists stepping up to provide them with the finest solutions available in the market.

In a captivating twist during the live demo, Sheetal engaged the audience by inviting them to design their own T-shirts, promising to have these creations delivered to their doorstep. (Hope its not a joke otherwise people will ask their Tshirt from Sheetal in SUGCON 2024 😊

I think Sheetal doesn't require a microphone due to his naturally robust and high-pitched voice.



6 Session “Utilizing Sitecore Edge-Powered Recommendations Enhanced by an Emotion Recognition Model” by “Surendra Kumar Sharma”

This was one of the best session of the day (shhhhhhh) which audience just love(shhhhhhh) where Surendra showed app demo (developed in just 3 days) which combines the power of Sitecore Edge and an advanced emotion recognition model to revolutionize personalized music experiences. By capturing a live video feed from webcam and analyzing facial expressions, this emotion recognition model accurately detects and predicts emotional state of the person in real-time. By using Sitecore Edge's powerful recommendation engine, this app provide you with a curated selection of songs that align with your emotions.

Did I forget to mention that its me!!!



MVP Program and the Community Mentorship by Nicole Montero

This marked the final session of the day, during which Nicole shared insights from her two-year Sitecore journey.

Nicole's presentation revolved around the coveted MVP (Most Valuable Professional) designation, wherein she provided a roadmap on how to attain this esteemed recognition. She also shed light on the MVP Mentorship program, an initiative facilitated by Sitecore, inviting interested individuals to participate. Most of the MVP programs are taking care by Tamas Verga and Nicole.

One can easily spot her in conference as she was the only white lady in conference.



Following this enlightening session, MVP trophies were distributed to many recipients, concluding with a delightful photo session to commemorate the occasion.




The day culminated with a delectable dinner at 8 PM, allowing attendees to expand their network by engaging in conversations and connecting with new faces within the Sitecore community.

Although it was nearly 10 PM by the time we returned home, it was undeniably a day filled with fruitful interactions and valuable experiences.


Day 2:

Day 2 of SUGCON India 2023 began bright and early, with attendees arriving by 8:30 AM. The first order of business for many of us was a hearty breakfast, setting the tone for another day filled with enriching insights and interactions.

The crowd on Day 2 numbered around 120 participants, slightly smaller than the previous day. It's likely that a few attendees were still feeling the effects of the lively gathering from the previous night's party and drinks n daruu.


1st session Build for XM Cloud according to the Architect of XM Cloud by Andy Cohen


Andy's session began on an interactive note as he initiated a game that piqued the curiosity of attendees. The challenge: Who had worked on the maximum number of Sitecore versions? Alistair emerged victorious, having embarked on his Sitecore journey from the 5.x version era, showcasing the enduring dedication of Sitecore enthusiasts.

The heart of Andy's presentation revolved around demystifying XM Cloud. He walked attendees through the essential steps to get started, from adding content and designing your site to creating a tunnel using ngrok for seamless development.


Dos and Don'ts on XM Cloud

One of the most invaluable aspects of Andy's session was his guidance on best practices. He emphasized the need to focus more on front-end technologies rather than diving deep into .NET and back-end code. Furthermore, he advocated for caution when it comes to Sitecore customizations for XM Cloud, highlighting the importance of aligning your strategy with the unique demands of a cloud-based environment.




2nd session Exploring the Experience Edge GraphQL Schema by Alistair Deneys


The second session of Day 2 was a class in the power of GraphQL, presented by none other than Alistair Deneys— the oldest guy ever met in the Sitecore community. Alistair holds the distinction of being the first MVP from Australia and has been an unwavering force in the Sitecore space for the past 18 years.

Alistair's vast experience shone through as he commenced his session by imparting the fundamentals of GraphQL. He then seamlessly transitioned into the fascinating realm of Experience Edge, Sitecore's pioneering foray into headless architectures.

Sitecore Veteran didn't just talk the talk; he walked the walk by conducting live demonstrations. Attendees had the privilege of witnessing how to craft queries for accessing published content and how the source system intricately shapes the schema of the GraphQL API. He unveiled the secrets of effortlessly navigating the documentation generated by the GraphQL schema.

One of the standout moments of the session was when Alistair unveiled how the type of source system (be it Content Hub, Content Hub One, XM, or XM Cloud) dynamically influences the schema. This, in turn, has a profound impact on how developers craft queries against the API.

Alistair went the extra mile by demonstrating practical consumption scenarios. Attendees witnessed how to harness the power of Sitecore's Experience Edge using Powershell scripts and .NET Core C# applications. This hands-on approach left a lasting impression, showing that theoretical knowledge can swiftly transform into real-world solutions.


3rd session FeaaS and Furious - XM To Cloud Component, A true composable offering by Daivagna Nanavati, Akshay Barve


The highlight of this session was the unveiling of XM Cloud Components, a revolutionary low-code, no-code development paradigm. While still in its early stages, the potential was evident as Daivagna and Akshay took attendees on a journey into the future of Sitecore development.

One of the most jaw-dropping moments of the session came when Daivagna and Akshay demonstrated their prowess by creating a page for the SUGCON India website in a matter of minutes. This was achieved by seamlessly crafting components powered by XM Cloud. The process boiled down to the simplicity of drag-and-drop functionalities and the assignment of data sources. Data sources could be direct JSON text, JSON outputs from APIs, or even crafting GraphQL queries.

Attendees were also treated to insights on themes within XM Cloud and effortlessly applying them to components. However, what truly set XM Cloud Components apart was the revelation that all these components are essentially created in Azure Blob, making them independent requests that render as separate HTML. This architecture ensures blazing-fast load times and a seamless user experience.

XM Cloud Components promised not only speed but also a new level of simplicity, making it accessible to developers of all levels of expertise.

Super easy, super fast!!!




4th session Integration of Generative AI within Sitecore: Enhancing Digital Experiences and Content Creation by Khushboo Sorthiya, Priyanka Gulia

It was undoubtedly one of these important sessions. Unfortunately, due to a delightful encounter with former colleagues who had specially visited the conference for few hours, I was unable to attend this session in its entirety.

The good news, however, is that SUGCON India 2023 recognizes the value of knowledge sharing. Sessions are recorded, ensuring that attendees who miss out on any particular session can catch up later. I am eagerly looking forward to watching the recording of this session to gain insights into the integration of Generative AI within the Sitecore ecosystem.


Last session Seamless Migration: Implementing XM Cloud with SXA Headless by Gunasekaran Kuppayee Sengodan, Harender Kumar

Again multiple session were scheduled here. I picked “Seamless Migration: Implementing XM Cloud with SXA Headless”.

Gunasekaran and Harender shared invaluable insights and practical strategies for executing a seamless migration. They emphasized the importance of understanding the unique needs and categories of customers' existing systems. This knowledge serves as the foundation upon which a well-planned migration can be built.

In this session, speakers also explained how the categories customers current system and then plan a process of transitioning from Sitecore XM/XP or other CMS products to a composable DXP using XM Cloud. They also highlighted valuable insights, practical strategies, and key considerations for a smooth migration.



Closing keynote

As the curtains began to fall on SUGCON India 2023, attendees gathered once more for the closing keynote—a heartfelt moment where panel speakers shared their sentiments about India, its people, and the vibrant Sitecore community that calls it home.




A Love for Indian Culture

The keynote was not just about technology; it was a celebration of the rich culture and culinary delights of India. Panelists expressed their affection for Indian food, a cuisine renowned for its diversity and flavors. The warmth of the Indian people also left an indelible impression on their hearts.


Passion for Sitecore in India

The keynote underscored the passion that the Indian Sitecore community brings to the table. The enthusiasm and dedication of Indian developers and marketers for the Sitecore platform was a recurring theme throughout the conference. It was a testament to the dynamic and thriving nature of the community.


Insights and Questions

The audience had the opportunity to pose questions to the panelists. Topics ranged from Sitecore Search and migration to upcoming programs for Sitecore developers. This interactive session ensured that attendees left with valuable insights and answers to their burning questions.


Promise of Tomorrow : Looking Ahead to 2024

As the conference drew to a close, the promise of the next gathering in 2024 hung in the air. Attendees eagerly awaited the announcement of the location, with Goa and Gujarat emerging as the top contenders. The excitement was palpable, and votes were cast. My preference is for Goa, adding to the anticipation for what the next conference will bring.


Creating Lasting Memories

The conference concluded with a memorable photo session, capturing the smiles and camaraderie of Sitecore enthusiasts. The day's experiences were sweetened with tea and delicious pakodas, a perfect ending to a day filled with learning and networking.

With great memories in their hearts, attendees bid adieu to SUGCON India 2023, knowing that they had been part of something special. 

Big Thanks to all organisers, sponsors, speakers, audience and to all who contributed to make this Conference successful.

Bye Bye SUGCON India 2023, Hello SUGCON India 2024!!!