Order Management page not working

Vote:
 

I have recently upgraded Episerver/commerce version. After this upgrade, we have a new "Oder Management" screen but it does not work.

The message is "Your session has expired. Please relogin.

Am I missing any configuration?

 

Sorry I can not attach a screenshot with the ticket.

#246463
Jan 06, 2021 17:07
Vote:
 

check this out... section with this heading "Fix for 'Customer is undefined' error [New in Commerce 13.9.0]"

https://world.episerver.com/documentation/developer-guides/commerce/orders/Order-management2/

#246527
Jan 08, 2021 7:11
Vote:
 

Thank you, Praful for your suggestion but it did not help to resolve the issue.

Now I'm going to compare User groups & access rights in old vs new version. 

Any more suggestion? 

#247687
Jan 26, 2021 15:10
Praful Jangid - Jan 27, 2021 5:12
Strange! We have Episerver.Commerce v13.19.0 installed and I don't see that happening (for sure, I saw that issue in some older projects but not in current one)
Is this happening on local system or in integration/preprod environments?
Vote:
 

I had to add this to the site initialization/global configuration to make it work, where the authenticationtype should be the same as what you use in your owin statrtup class. If you use owin that is.

config.Filters.Add(new HostAuthenticationFilter(DefaultAuthenticationTypes.ApplicationCookie));
#248020
Feb 02, 2021 13:32
Vote:
 

Do you have ServiceAPI installed? ServiceAPI remove the cookie authentication for WebAPI controllers which causes that issue. It's a known issue but no workaround so far, unfortunately, except to have ServiceAPI as a separate website instead

#248079
Feb 03, 2021 13:36
Vote:
 

Hi Quan - Thanks for your reply - Yes we are using Service API

#248088
Edited, Feb 03, 2021 17:07
Vote:
 

Quan, we are also running into this issue. You mention a possible solution is to setup the ServiceApi as a separate website. Can you point me to some doucmentation about to how to do this?

#250265
Mar 16, 2021 20:05
Vote:
 

You can setup an empty site and then install ServiceAPI to it. As long as you set the correct connection strings it should just work

#250290
Mar 16, 2021 23:25
Vote:
 

@Naveed If @Jeroen's solution doesn't work for you.

You can also create an InitializationModule and add the following code in:

var handler = GlobalConfiguration.Configuration.MessageHandlers.FirstOrDefault(x => x.GetType() == typeof(PassiveAuthenticationMessageHandler));
            GlobalConfiguration.Configuration.MessageHandlers.Remove(handler);

This will open up the Order Management screen to look for authentication in the cookies in addition to the headers.

Service API uses SuppressDefaultHostAuthentication which locks down authentication to headers to protect against csrf attacks.

#250915
Mar 18, 2021 11:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.