Artur
September 16, 2020, 5:27am
1
Hi,
This is a bit related to:
Today I picked up an old piece of code that used to work, it’s an API that calls the ProductItemViewModelBuilder, but calling gets this error:
“System.NotSupportedException - Cant store OrderCarrier into users session.”
on
var currency = _requestModelAccessor.RequestModel.Cart.Currency;
or
var currency = Cart.Currency;
am fairly sure this worked a couple of versions ago, any input?
Litium version: 7.4.2
Like him we have the ProductItemViewModelBuilder
that we start from an api request.
It works locally on our development machines without issues but as soon as its out on test it throws this error because of var currency = Cart.Currency;
Difference from that post is that we are calling this from an Controller that inherits the ApiControllerBase
and using the routeprefix [RoutePrefix("api/....]
Am I missing something here?
Why is there a difference on test vs local enviroment? Some kind of configuration?
Litium version: 7.4.0
Artur
September 17, 2020, 2:46pm
2
Seems to be an issue with External login providers on Litium 7
Commenting out app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
did the charm.
Please, hurry up and fix this bug, We need External Providers and Add to cart to work
Do you have the bug number for the issue you refer to?
I know about https://docs.litium.com/support/bugs/bug_details?id=51472 that was fixed and will be included in the next release.
1 Like
marten
September 18, 2020, 6:11am
5
Steps I took to solve what I think is the same issue (the bug that Patric links to) after getting the bugfix.
Change interface from IOwinStartupConfiguration
to IOwinStartupStageConfiguration
(available now in the latest 7.4.3 prerelease only).
The new interface make it possible to trigger your Owin setup in different stages by setting PipelineStage
, set this to:public PipelineStage PipelineStage => PipelineStage.PostAuthorize;
1 Like
Nice! Thank you @marten I will try it out.
system
Closed
October 16, 2020, 8:45am
7
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.