I'm working on a project using SDL Web Cloud (8.1) and DXA 1.7. I'm encountering an error with Ambient Data Framework. I enter a URL such as .../example-page/?test
Instead of rendering the page as is, it renders {"error":"InternalServerError"}
.
Looking at the cd_client.log
, I found:
ERROR [Sdl.Web.Delivery.ADF.AmbientRuntime.OnRequestStart] - Problem EXCEPTION: System.ArgumentNullException: Value cannot be null. Parameter name: key at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue, value, Boolean add) at Sdl.Web.Delivery.ADF.AmbientRuntime.SetWebRequestClaims(HttpRequest request, IClaimStore claimStore) at Sdl.Web.Delivery.ADF.AmbientRuntime.OnRequestStart(HttpApplication application, HttpContext context, IClaimStore claimStore, ISet`1 templateReadOnlyClaims, ISet`1 templateImmutableClaims, ISet`1 templateSessionScopeClaims, Boolean dispatchOdataRequest)
ERROR: [Sdl.Web.Delivery.ADF.AmbientRuntime.OnRequestStart] - Setting status code:500
What I've tried:
- Disable ADF from web.config - page renders as expected
- Step through via PageController to identify where ADF is referenced or error is thrown - no luck
- Check site log - no error
- Reviewed
cd_ambient_conf.xml
to see if there's any configuration to avoid this - no luck - Reviewed ADF documentation
Is there anything I can do (i.e. perhaps using a RequestValidator) to avoid returning this error? There will be instances when query string value will be empty.
key=value
, whereas your query string parameter only has a key (test
)