locked
Login screen keeps refreshing after submit RRS feed

  • Question

  • User507136879 posted

    This is a weird bug that I cant figure out.

    I have an ASP website that I published to a local server - Windows Server 2012 R2 and it is using IIS 8.

    I am using Identity for the security/login portion of the site and it works just fine in Visual Studio and it worked great after deployment for about a week or so. I'm just using the default code that's provided in the template when you create a new website. I'm using WebForms and Individual User Accounts for authentication. I created a new database for the user accounts and such which resides on the same server as well. 

    Now to the problem. At the login screen you enter your email address and password and click the login button. The screen acts like it refreshes or flashes. If I purposely enter the wrong password it shows the error label and says "Invalid Login Attempt" which tells me that it is hitting the database and tries to validate the login. Here's the weird part... If i restart the website on the server in the IIS manager then it will work for a while but eventually it has the same issue. I thought it might be the Rapid Fail Detection but I disabled that and it is still happening.

    Does anyone have anything I can try to help fix this bug or can point me in the right direction? 

    Wednesday, March 21, 2018 12:31 AM

All replies

  • User475983607 posted

    Your question is not clear but I think the issue is the login page stops working for no particular reason. 

    Most likely there is an error returned from an async call but the error is ignored.  Look for async Identity APIs, SignInManager and UserManager, that are hitting the data store but the results are not checked or there is a check but the code is not displaying the error.

    Wednesday, March 21, 2018 11:24 AM
  • User507136879 posted

    I tried your solution but there aren’t any errors being thrown. It is still happening. Any other ideas? Keep in mind I haven’t changed the code on the login page that is automatically created when you make a new web site project. I have to restart the application pool and website to get it working again. Is there a limit to how many users can be logged in at the same time?

    Correction: After looking at the console I saw a threading error so I corrected that. I hope that fixes the issue. Thanks for pointing me in the right direction! 

    Wednesday, March 21, 2018 1:09 PM
  • User475983607 posted

    Keep in mind I haven’t changed the code on the login page that is automatically created when you make a new web site project. I have to restart the application pool and website to get it working again. Is there a limit to how many users can be logged in at the same time?

    No limit.  Web sites are stateless.  The authentication cookie, if present, identifies if the user can access secured resources.

    Can you post the Login.aspx page and Startup.Auth.cs?  

    Restarting the app can mean issues elsewhere in the application.  Are you using Session for anything?  Try using the browser's dev too (F12) to view the login request in the network tab.  Are you seeing any redirects? 

    Do you see any errors in the Event Viewer or IIS logs?

    Wednesday, March 21, 2018 2:07 PM