Apparently we can configure DXA to take the context claims from ADF instead of the Context Engine (which uses the context service), but how?

By the way, I want this because I don't want my website to use the context service. So I want to prevent the DXA webapp to try to pull the context claims from the Context Engine.

This is for DXA 1.7 .NET on Web 8.5 with micro services.

  • Can you elaborate on why you don't want to use the Context Service? Note that DXA uses the Context Service by default on SDL Web 8+, because it performs (much) better than retrieving the Context Engine claims from the Content Service through ADF. Or do you not care about Context Engine at all (nor about DXA's server-side responsiveness)? – Rick Pannekoek May 1 '17 at 16:54
  • @RickPannekoek, In my web application I am not using the context feature. The server side responsiveness is a nice feature but not used in every implementation. My web application was still calling the Context service at http://sentcdd01.lindex.local:8087/context.svc/$metadata, only when the webapp is started. To prevent this unnecessary call I configure the AdfContextClaimsProvider. My second use case is for integration testing. I want to be able to record all microservice calls so that the same state can be used for integration testing. For that I also disable the ContextClaimsProvider. – Jan H May 2 '17 at 12:14

Changing the Unity configuration to use AdfContextClaimsProvider instead of ContextServiceClaimsProvider does the trick.

From unity.config in the root of the site webapp:

    <type type="IContextClaimsProvider" mapTo="AdfContextClaimsProvider">
      <lifetime type="singleton" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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