This topic is locked

Auto Login

8/13/2008 18:07:40
ASPRunnerPro General questions
jadach authorDevClub member

My website already has an existing login system (outside of ASPRunner). Using ASPRunner, I created my new project and with it created a login page. I selected the "Username and password from database" option, then selected the table that controls my existing login system. This way I control users globally, in one location for both my entire website and ASPRunner projects.
This works fine for asprunner, but the only thing is, users have to login twice. For example, they login just to enter the site. From there, depending on access levels, they may have access to an asprunner project. When they click to the project, they need to login again.
My current login system is creating session variables that I would like to use in order to bypass the asprunner login. How can I do that?
My current session variables include:

Session("HRUserID")

Session("HRx_firstname")

Session("HRx_lastname")

Session("HRUserName")

Session("HRAccessLevel")
Thanks!!

J
Jane 8/14/2008

Hi,
you can check your session variables in the Login page: Before process event on the Events tab, fill ASPRunnerPro session variables and redirect to the list or menu page.

Here is the list of ASPRunnerPro session variables:

http://www.xlinesoft.com/asprunnerpro/docs...n_variables.htm

jadach authorDevClub member 8/14/2008

Hi,

you can check your session variables in the Login page: Before process event on the Events tab, fill ASPRunnerPro session variables and redirect to the list or menu page.

Here is the list of ASPRunnerPro session variables:

http://www.xlinesoft.com/asprunnerpro/docs...n_variables.htm


I understand what you are saying but am having an awful time figuring out how to write the code. I've tried many variations, but no luck.
Here is the last attempt I made.
if Request.ServerVariables("LOGON_USER")<>"" then

Session(appName&"HRUsername") = Request.ServerVariables("UserID")

Response.Redirect "HR_ChangeStatus_list.asp"

end if
Any help would be much appreciated.
Thanks

J
Jane 8/15/2008

Hi,
please check list of SESSION variables more carefully.

For example here is the correct code:

if Request.ServerVariables("LOGON_USER")<>"" then

Session("UserID")= Request.ServerVariables("UserID")

Response.Redirect "HR_ChangeStatus_list.asp"

end if

jadach authorDevClub member 8/15/2008

Hi,

please check list of SESSION variables more carefully.

For example here is the correct code:


Thanks Jane. That doesn't do what I want. I'm probably trying to do this the hard way. I think I'm going to take a different approach.
I will NOT use the login from asprunner, instead I will authenticate via my current login system. That part is easy.
NOW THE BIG QUESTION:

How can I get the list page to show ONLY records where the field username = Session("HRUserName")
Thanks again!!!!!

J
Jane 8/18/2008

Hi,
use User can see and edit their own records only security method on the Advanced security settings dialog on the Security tab.

Then set up all required session variables (for example Session("_" & strTableName & "_OwnerID"), Session("OwnerID")) on the Login page: Before process dialog.

jadach authorDevClub member 8/18/2008

Hi,

use User can see and edit their own records only security method on the Advanced security settings dialog on the Security tab.

Then set up all required session variables (for example Session("_" & strTableName & "_OwnerID"), Session("OwnerID")) on the Login page: Before process dialog.


I'm sorry, but I can't make this work.
The site is set to annonymous access in IIS. I'm using a login system that is global to the site (not an asprunner system). I already have session variables that allow me to authenticate the asprunner project. This works fine, but the user sees all records.
I want the logged in user to only see his/her records on the list page based on the field called Usename. The Username field is = to Session("HRUserName").
Is there a way, using my login sytem session variables to ensure the user only sees his/her records without using the login created by asprunner? OR can I set up the login via asprunner and check off "User can see and edit their own records only", then bypass the login screen due to the fact the user is already logged in via my login system?
Sample code would be most appreciated.
Thanks Jane.

J
Jane 8/19/2008

Hi,

OR can I set up the login via asprunner and check off "User can see and edit their own records only", then bypass the login screen due to the fact the user is already logged in via my login system?



Yes.
Please see sample code in the previous messages.
If it doesn't help publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with your instructions.

jadach authorDevClub member 8/19/2008

Hi,

Yes.
Please see sample code in the previous messages.
If it doesn't help publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with your instructions.


Jane, sorry for being so thick. I did use the code above and it did bypass the login page. However, when I get to the list page I see I am logged in as 1 and I can't view any records at all.

J
Jane 8/20/2008

I see I am logged in as 1 and I can't view any records at all.



This means you have not filled all required session variables in your event.

Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with your event code and I'll try to help you.

jadach authorDevClub member 8/20/2008



This means you have not filled all required session variables in your event.

Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with your event code and I'll try to help you.


I think I have it now. Thanks Jane for all your help.