1

Can we enable AmbientFrameworkModule based on some url only? If I add below

<add name="AmbientFrameworkModule" 
type="Tridion.ContentDelivery.AmbientData.HttpModule" preCondition="managedHandler" />  

code in web.config, the ambient is making content service call for every resource request , can we have this to do the call only based on a filter?

2 Answers 2

1

The short answer is no. There is no way to configure an HTTP module to only run for certain requests (it would have to be a Handler instead).

I do want to point out, though, that preCondition="managedHandler" means that it will only run for requests to ASP.NET applications or managed handlers. So in a default application it won't run on images or other static files.

3
  • mm.. its really affecting the performance.. with DD4T/DXA even images are handled through handlers :-( , un necessary calls are making the response slow..
    – Rafeeq
    Apr 5, 2017 at 13:29
  • Note that DXA doesn't serve images using a handler, but with a module (yes, I know that sounds quite bizarre :-): the DxaStaticContentModule. Having said that, I think I have observed ADF requests to Content Service for images too, indeed. Note that if you don't use ADF in your implementation (which implies you don't need Session Preview, AM, XO), you can disable the AmbientFrameworkModule altogether, resulting in significant performance gains. Apr 5, 2017 at 17:34
  • Thanks for the information @RickPannekoek , I am using XO so I would need to enable ADF to work this. I am literally facing the performance issue when I enable it; I really suggest in a future release if SDL comes up with some way of filtering it as we do in DD4T binary handlers.
    – Rafeeq
    Apr 6, 2017 at 5:30
0

I really don't know if this is the right approach, I am able to generate the triggers by creating the custom ClaimsClass as below.

  AmbientDataContext.CurrentClaimStore = 
 Activator.CreateInstance(typeof(ClaimStore), true) as ClaimStore;
       AmbientDataContext.CurrentClaimStore.Put(new Uri("taf:claim:country:name"), "UAE", 
Tridion.ContentDelivery.AmbientData.Runtime.ClaimType.Normal);

I am able to get the query executed, but I don't think it would work with experiments, Only works with custom claims.

Your Answer

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

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