I have coded a C# MVC 5 Internet application and have a question about the authorize
attribute.
Is there better security for this attribute in a controller?
Here is the situation that I have... if a user registers a username and a password, and then logs in with this username and password, the user can then access a controller with the authorize attribute.
If I change the database name, such that a new database is created, then load the Index view, the view still thinks that the user is logged in, and can access the controller with the authorize attribute.
Is there some way to prevent this? Should I just do a quick check to see if the username and password are correct for the current database, or is there an easier/better way?