2

While running the web application of my project (DXA 1.5 & SDL Web 8), I get below error in cd_client.log file.

ERROR [Sdl.Web.Delivery.ADF.Ambient Runtime.OnRequestStart] - Failed to send claim store

Exception Details:

EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotSupportedException: Specified method is not supported.

StackTrace:

2018-04-16 21:29:54 ERROR [Sdl.Web.Delivery.ADF.AmbientRuntime.ExecuteODataAction] - Failed to send claimstore
               EXCEPTION:
               System.Reflection.TargetInvocationException: Exception has been thrown 
 by the target of an invocation. ---> System.NotSupportedException: Specified method is not supported.
                  at System.Web.HttpResponseStream.get_Length()
                  --- End of inner exception stack trace ---
                  at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
                  at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
                  at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
                  at Sdl.Web.Delivery.Core.ReflectionUtils.<>c__DisplayClass37_0.<GetGetMethodByReflection>b__0(Object source)
                  at Sdl.Web.Delivery.Core.JsonParser.TrySerializeUnknownTypes(Object input, Object& output)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeObject(IEnumerable keys, IEnumerable values, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeObject(IEnumerable keys, IEnumerable values, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeObject(IEnumerable keys, IEnumerable values, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeObject(IEnumerable keys, IEnumerable values, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeObject(IEnumerable keys, IEnumerable values, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.SerializeValue(Object value, StringBuilder builder)
                  at Sdl.Web.Delivery.Core.JsonParser.Serialize(Object obj)
                  at Sdl.Web.Delivery.ADF.ClaimStore.ClaimStore.SeraializeJson()
                  at Sdl.Web.Delivery.ADF.AmbientRuntime.ExecuteODataAction(HttpApplication application, IDictionary contextItems, Boolean requestStart, Boolean sessionIsNew)

Any idea why this is coming, and how this can be avoided?

Thanks, Sharad

  • Weird. Is there a Stack Trace for the exception in the log file? – Rick Pannekoek May 18 '18 at 17:00
  • Hi @RickPannekoek, I have update the question with Stack Trace as well. Hope this helps. – Sharad Kumar Sangal May 23 '18 at 6:20
  • Since you’re using a quite old version of DXA, I guess it has been working earlier? When did this error start occurring? – Rick Pannekoek May 23 '18 at 6:30
  • Actually, this error is coming from beginning, but we ignored it as it was not breaking the site. The application is in production for more than a year now. However, client had some Audit, and in that this log was identified. I am looking if there is a way if we can handle this and stop it from going to log file. – Sharad Kumar Sangal May 24 '18 at 7:33
  • See my (updated) answer. – Rick Pannekoek May 24 '18 at 8:52
4

The error is not specific to DXA; it occurs in the Ambient Data Framework.

Looking at the Stack Trace, it seems that there is some claim with an unexpected type (HttpResponseStream ?!) which cannot be serialized by the JSON serializer used in the ADF.

Did something change recently with regard to your ADF claims? It may be best to contact SDL Support to get this issue further analyzed.

UPDATE:

You mentioned this error has always been there, but doesn't affect the functionality of your web app. Since the error seems rather blocking for ADF, I'm wondering if you really need ADF for your web app in the first place.
If not, you can simply disable it altogether. ADF is known to cause significant performance overhead, so by disabling ADF you will not only get rid of these weird errors in the log, but you will also get significantly better performance.

ADF is required for several product features:

  • Session Preview (XPM)
  • Experience Optimization
  • Audience Manager
  • User Generated Content
  • Context Expressions

If you are not using any of those features and not using ADF yourself in your implementation, it is recommended to disable it.

For DXA.NET, ADF can be disabled by removing the AmbientFrameworkModule in your Web.config (under /configuration/system.webserver/modules)

| improve this answer | |
  • Thanks Rick for the answer. Can please also let me know how to disable ADF? I am not using any of the above mentioned features – Sharad Kumar Sangal May 24 '18 at 9:19
  • Updated the answer for that. – Rick Pannekoek May 24 '18 at 10:08

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.