Question refresh page after success login go to login page why and how to solve ?

ahmedsalah

Active member
Joined
Sep 26, 2018
Messages
32
Programming Experience
3-5
problem

When Make login and refresh or reload page after login it come back to login page ?

I work on asp.net MVC project web API work with angular 7 project client side .

my problem is when write user name and password correct it make login and go to dashboard page that I done to work after login succeed .

but problem after i succeed login and go to dashboard if i make refresh or reload to page dashboard it go to the login page .

so that how to handle this echo on angular 7
 
Sounds like a Angular 7 problem rather than a C# problem. This is a C# forum.

Anyway, on a high level the issue is that the web and its protocols is meant to be stateless. You are trying to give the illusion of statefulness (e.g. logged in vs. not logged in). You'll have to play some tricks of trying to remember the user's state by using cookies or local storage to keep track of a session state and communicate with the server that you are interested in that session if it is available.
 
Back
Top Bottom