So, I found out a few things about session variables and the multi-page login process that I use:
1. Sometimes Alpha WAS, and Alpha IIS, tell the browser to do a "GET" on the"Redirect page - login" that has been configured in the project's "Web Security / Security Policy" tab, even though at that time there is no reason to redirect the user, because at that point they are already logged on! When the server subsequently receives that bad redirected "GET" it executes the xbasic in the page, but ends up not sending the response for that page. Maybe it sends another page (the correct page) instead. If you have a secured application where users must have the exact link to your login page then you are in for some trouble. In this case the "Redirect page - login" is not going to be configured as the login page; you don't want to make that page public in this scenario. The only people that should be coming into your site will be using the exact URL to your login page. Your "Redirect page - login" is instead going to be a page that tells them "accessed denied" or some such thing. If you like keeping things tidy, you might also want to blow away any session variables if the user is directed to that page, as you don't really know when Alpha might direct someone to this page. And here lies the problem, session variables that you have setup from previous steps in the login process will be blown away when they should not be, if you are being tidy. So, the suggestion here is to not clear or delete any session variables in the "Redirect page - login", under this scenario.
2. It is possible the random login failure that I observe in the production copy of my application is due to #1 above, or, more likely, it is due to a timing / synchronization issue. In the production app, session variables are stored in a SQL server database on a separate server than the web server. As mentioned by someone else on these forums, there may always be a timing issue that session variables may not be ready to read after they have been written.
3. I have mentioned this before, but I will repeat it here: Allowing a user to have multiple tabs or instances of a browser open into your application can be extremely dangerous to the integrity of the database if session variables have anything to do with updateable data fields. Session variables are not unique to the browser's tab or instance:
https://stackoverflow.com/questions/...ch-browser-tab
Despite its name, the attached project is for regular Alpha WAS, not IIS. I setup this project to demonstrate why a developer might need a multi-page login process. It starts by using the old Login Component, which if you are following some newer recommendations, you should just abandon along with the multiple a5w pages and go with a UX.
I probably tested the attached program 50 times over a couple of days before it failed as described in issue # 1, above.
1. Sometimes Alpha WAS, and Alpha IIS, tell the browser to do a "GET" on the"Redirect page - login" that has been configured in the project's "Web Security / Security Policy" tab, even though at that time there is no reason to redirect the user, because at that point they are already logged on! When the server subsequently receives that bad redirected "GET" it executes the xbasic in the page, but ends up not sending the response for that page. Maybe it sends another page (the correct page) instead. If you have a secured application where users must have the exact link to your login page then you are in for some trouble. In this case the "Redirect page - login" is not going to be configured as the login page; you don't want to make that page public in this scenario. The only people that should be coming into your site will be using the exact URL to your login page. Your "Redirect page - login" is instead going to be a page that tells them "accessed denied" or some such thing. If you like keeping things tidy, you might also want to blow away any session variables if the user is directed to that page, as you don't really know when Alpha might direct someone to this page. And here lies the problem, session variables that you have setup from previous steps in the login process will be blown away when they should not be, if you are being tidy. So, the suggestion here is to not clear or delete any session variables in the "Redirect page - login", under this scenario.
2. It is possible the random login failure that I observe in the production copy of my application is due to #1 above, or, more likely, it is due to a timing / synchronization issue. In the production app, session variables are stored in a SQL server database on a separate server than the web server. As mentioned by someone else on these forums, there may always be a timing issue that session variables may not be ready to read after they have been written.
3. I have mentioned this before, but I will repeat it here: Allowing a user to have multiple tabs or instances of a browser open into your application can be extremely dangerous to the integrity of the database if session variables have anything to do with updateable data fields. Session variables are not unique to the browser's tab or instance:
https://stackoverflow.com/questions/...ch-browser-tab
Despite its name, the attached project is for regular Alpha WAS, not IIS. I setup this project to demonstrate why a developer might need a multi-page login process. It starts by using the old Login Component, which if you are following some newer recommendations, you should just abandon along with the multiple a5w pages and go with a UX.
I probably tested the attached program 50 times over a couple of days before it failed as described in issue # 1, above.