Hi,
We are upgrading Dynamics Retail form PU12 to PU20.
CustomeResponseClass resp = GetChannelConfigurationDataRequest.RequestContext.Execute<CustomeResponseClass >(CustomRequestClass);
When i execute the above mentioned line, it is giving error as mentioned below:
An error occurred during the Retail Server Request. RequestUri: usnconeboxax1ret.cloud.onebox.dynamics.com/.../GetOrgUnitConfiguration. RequestId: b166eaf9-ae76-4d64-bf69-181242da87d9. Exception: Microsoft.Dynamics.Commerce.Runtime.UserAuthenticationException: Could not retrieve channel identifier when resolving operating unit from request header.
at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.OperatingUnitAuthenticationMiddleware.TryResolveChannelMetadata(IOwinContext context, Nullable`1& channelId, String& operatingOrgUnitNumber, String& countryRegionIsoCode)
at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.OperatingUnitAuthenticationMiddleware.<Invoke>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.DeviceTokenAuthenticationMiddleware.<Invoke>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.CommerceIdTokenAuthenticationMiddleware.<Invoke>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Instrumentation.InstrumentationMiddleware.<Invoke>d__6.MoveNext().
An error occurred while trying to retrieve the channel id based on the Operating Unit Number '068'. Exception: Microsoft.Dynamics.Commerce.Runtime.CommerceException: Invalid channel id 0 in current principal. Request type is CustomRequestClass .
at Microsoft.Dynamics.Commerce.Runtime.Workflow.Composition.PipelineRequestTrigger.OnExecuting(Request request)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.RunOnExecutingTriggers(Request request, IEnumerable`1 triggers)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
at Sdk.SonWorkflowExtensions.SonCancelReturnOrderTrigger.OnExecuted(Request request, Response response) in C:\CustomTrigger.cs:line 36
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.RunOnExecutedTriggers(Request request, Response response, IEnumerable`1 triggers)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler, Boolean skipRequestTriggers)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context, IRequestHandler handler)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.Execute[TResponse](Request request, RequestContext context)
at Microsoft.Dynamics.Commerce.Runtime.Client.ChannelManager.GetChannelConfiguration(Int64 channelId)
at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Authentication.OperatingUnitAuthenticationMiddleware.TryResolveChannelMetadata(IOwinContext context, Nullable`1& channelId, String& operatingOrgUnitNumber, String& countryRegionIsoCode).
An exception of type: 'Microsoft.Dynamics.Commerce.Runtime.CommerceException' occurred while executing CustomRequestClass request by Microsoft.Dynamics.Commerce.Runtime.Workflow.Composition.PipelineRequestTrigger. Error resource id: 'Microsoft_Dynamics_Commerce_Runtime_InvalidChannel', Exception: Microsoft.Dynamics.Commerce.Runtime.CommerceException: Invalid channel id 0 in current principal. Request type is CustomRequestClass.
at Microsoft.Dynamics.Commerce.Runtime.Workflow.Composition.PipelineRequestTrigger.OnExecuting(Request request)
at Microsoft.Dynamics.Commerce.Runtime.CommerceRuntime.RunOnExecutingTriggers(Request request, IEnumerable`1 triggers).
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156