'ASP.net core Authentication token becomes invalid randomly on hostgator

I'm having issues with hosting my website on a windows server by Hostgator and I'm not sure where the problem lies.

The issue is whenever I login to my website I built, and I try to process an order, or go through the checkout screens on my website, it fails because the authentication token is invalid. It does not expire, and works on localhost, and also works on azure hosting. (I know little to nothing about azure hosting and would rather stick to hostgator windows hosting).

I don't see any error messages anywhere I look.

Update: This doesn't seem to be the issue anymore. "I did notice the asp.net framework version is 4.8.0 and my application is 5.0 but other than that, I can't see any other reason for this not to work."

If you want to see the issue for yourself:

shop.vents-us.com Username: [email protected] Password: HelloWorld1! Fake credit card to use: 4242424242424242 424 42424

As you try to complete the checkout, it will log you out.

I'll update as I keep researching. Thanks!

Update: It is not on heavy processing like previously thought. It seems almost random. If I am switching between screens that require login, it kicks me out within a couple minutes. I checked my timeout, and it's set to 30 minutes.

Update: Still having the issue even after making the deployment mode self-contained. Deployment Settings

Update: Here's the packages installed on the server from hostgator: .NET runtimes installed: Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Update: I have managed to get the bug on film enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source