After the user enters a username/password and clicks a button a few steps happen:
- Password is encrypted and checked against small database table (customMembershipProvider)
- A query returns the users roles (customRoleMembershipProvider)
- A query is run that returns about 30 records
FormsAuthentication.RedirectFromLoginPage(userNameTextbox.Text, true);is calledResponse.Redirect(@"~/Home.aspx", true);is called- User arrives at simple html page
I have verified that it isn’t the queries (1, 2, 3 been cached so it doesn’t even hit the database). The page that the user is redirected to is also cached and has no database logic on it. In production it is much faster of course, but still not as snappy as I want. What could be causing this issue? Also, I noticed once I do login, the next time I login (same or different user) the user is redirected instantaneously.
Thanks!
Turned out the slowness was only caused by the following combination:
Windows 7 Ultimate, VS2010 Ultimate, Any CPU configuration
Fixed by adding an x86 debug configuration and using it instead of the Any CPU configuration.