Wrong user getting displayed on front end #11911
-
|
I have an OrchardCore (1.4) site that is hosted on Windows Server 2008 R2 and IIS 7.5. I have created a theme for the front and copied the LoginMenu.cshtml from TheTheme (https://github.com/OrchardCMS/OrchardCore/blob/9c8f94ff18a462a2d7c0f1feaf4397000f636849/src/OrchardCore.Themes/TheTheme/Views/LoginMenu.cshtml) into my theme. If I log in as one user, then log out and log in as another user sometimes the front end still shows the previous user is logged in but if I go to the admin side it shows the correct user. I can go back to the front end and it still has the incorrect user name displayed. I disable caching in my browser and it still is wrong. If I wait 5 or 10 minutes and refresh the page it will show the correct user. This also happens sometimes when one person logs in on their computer and then another person logs in on a different computer. I have not been able to reproduce the issue locally so I'm thinking this is more of a server/IIS issue than OrchardCore but if anyone has any ideas what could cause this I would appreciate it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
|
Have you checked the "remember me" option when you are logging in so that it persists a cookie? Because the admin side has its own cookie that uses the tenant ID or name if I remember correctly. You need to define if you are using 2 different cookies or only 1 for both admin and frontend. Right now it looks like it is not using the same cookie to define the current user. |
Beta Was this translation helpful? Give feedback.
Have you checked the "remember me" option when you are logging in so that it persists a cookie? Because the admin side has its own cookie that uses the tenant ID or name if I remember correctly. You need to define if you are using 2 different cookies or only 1 for both admin and frontend. Right now it looks like it is not using the same cookie to define the current user.