1

Based on the information provided in the Sitecore documentation,

https://doc.sitecore.com/xp/en/developers/103/sitecore-experience-platform/create,-retrieve,-and-search-contact-and-interaction-data.html

I am encountering an error related to a missing using directive or assembly reference when attempting to create a proof of concept (POC). Specifically, the error is related to the line of code:

var certificateModifier = new CertificateWebRequestHandlerModifier(options);

Can you please let me know the namespace that needs to be imported?

2 Answers 2

2

From the mentioned link, Can you please replace the piece of code with the followings and verify:

 var xdbCollectionCert = "StoreName=My;StoreLocation=LocalMachine;FindType=FindByThumbprint;FindValue=15E6693B0AECB63DE57D991EC363CA462DC52432";
 var options = CertificateHttpClientHandlerModifierOptions.Parse(xdbCollectionCert);

 var certificateModifier = new CertificateHttpClientHandlerModifier(options);

also instead of

var certificateModifier = new CertificateWebRequestHandlerModifier(options);

try with and verify. Hope it helps you.

 var certificateModifier = new CertificateHttpClientHandlerModifier(options);

If you will check the Sitecore.Xdb.Common.Web namespace you will find that CertificateWebRequestHandlerModifier renamed with CertificateHttpClientHandlerModifier. enter image description here

0

It lives in Sitecore.Xdb.Common.Web.

using Sitecore.Xdb.Common.Web;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.