Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Attempting to save User ID and password(Logon)


Message #1 by "Larry Rosenzweig" <rosenzl@o...> on Thu, 15 Nov 2001 22:57:47
I have an application that when you click on a link, it requests that you 

enter your User ID and Password. What is the easiest way to save the User 

ID and Password?(without persistance and cookies)  



I do not want to use Persistance or Cookies, if possible. I want to add a 

user id and password to an access database and check to see if the user is 

there. If the user does not exist, I will send them a message, asking them 

if they want me to add their user id and password.



Simply put, I need the ability to check if the potential customer has 

logged on or not. If they did, I can compare what's in the database to 

their logon. If they did not, I need the ability to request that they add 

themselves. 



Thanks for your help!



Larry

 
Message #2 by "Ken Schaefer" <ken@a...> on Fri, 16 Nov 2001 11:15:45 +1100
Larry,



a) Authenticating the user. This is easily done. Get their username/password

combo from fields. See if there is a match in the database. If the resulting

recordset is .EOF then the combination doesn't exist in the database, so ask

them if they want you to add them



b) I don't understand what you're talking about re persistance and cookies.

Unless you want the user to have to authenticate themselves on *each* and

*every* page, you need to use some kind of session state management to track

the fact that they are logged on. You could use a cookie to do this (for

example)



c) I'm not really sure what this has to do with Access and ASP though...



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Larry Rosenzweig" <rosenzl@o...>

Subject: [access_asp] Attempting to save User ID and password(Logon)





: I have an application that when you click on a link, it requests that you

: enter your User ID and Password. What is the easiest way to save the User

: ID and Password?(without persistance and cookies)

:

: I do not want to use Persistance or Cookies, if possible. I want to add a

: user id and password to an access database and check to see if the user is

: there. If the user does not exist, I will send them a message, asking them

: if they want me to add their user id and password.

:

: Simply put, I need the ability to check if the potential customer has

: logged on or not. If they did, I can compare what's in the database to

: their logon. If they did not, I need the ability to request that they add

: themselves.

:

: Thanks for your help!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Message #3 by lrosenzweig <rosenzl@o...> on Fri, 16 Nov 2001 16:19:18 -0500
Ken, my problem is as follows:



Once the user is logged on and I check the database to see if he is

there(schedule.asp), I let him in if he is there. But, when the user goes to

another part of the page and they change the date or select a different

option, the link goes back to the same page(schedule.asp) that already

checked the user's logon id and password.  I don't have the user's id and

password available to me at that time.



Here is a sample of what I am talking about. This  code is in schedule.asp.

chkLogon2 does the actual checking in the database.

So, when getting here initially, the user id and password are nulls. Then

when it comes back here again with the valid user id and password, it works

fine. However, when that same user clicks on a different date option, which

is not part of schedule.asp, the user id and password are not present to

compare with the database. In short, multiple .asp's go to schedule.asp.



I hope this is clear!



Thanks for your help.



Larry



Dim dDate, RS, sSQL, intResourceID

Dim Conn, cmdTemp, prm

Dim I, intNumSteps, sResName

Dim aryUser, aryTimes, aryCols

Const iMaxResourcesRow = 3 '# Links in a Row

%>



<!-- #INCLUDE FILE="Config.inc" -->

<!-- #INCLUDE FILE="ScheduleConfig.asp" -->

<%

Dim sLogon, sPassword

sLogon = Request.Form("txtLogon")

sPassword = Request.form("txpPassword")

'If sLogon = "" And sPassword = "" Then

If Request.Form("txtLogon") = "" And Request.Form("txtPassword") = "" Then

Response.Redirect "Logon2.asp?Error=" & Server.URLEncode("Please logon to

access schedule")

End If

%>

<!-- #INCLUDE FILE="chkLogon2.inc" -->





-----Original Message-----

From: Ken Schaefer [mailto:ken@a...]

Sent: Thursday, November 15, 2001 7:16 PM

To: Access ASP

Subject: [access_asp] Re: Attempting to save User ID and password(Logon)



Larry,



a) Authenticating the user. This is easily done. Get their username/password

combo from fields. See if there is a match in the database. If the resulting

recordset is .EOF then the combination doesn't exist in the database, so ask

them if they want you to add them



b) I don't understand what you're talking about re persistance and cookies.

Unless you want the user to have to authenticate themselves on *each* and

*every* page, you need to use some kind of session state management to track

the fact that they are logged on. You could use a cookie to do this (for

example)



c) I'm not really sure what this has to do with Access and ASP though...



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Larry Rosenzweig" <rosenzl@o...>

Subject: [access_asp] Attempting to save User ID and password(Logon)





: I have an application that when you click on a link, it requests that you

: enter your User ID and Password. What is the easiest way to save the User

: ID and Password?(without persistance and cookies)

:

: I do not want to use Persistance or Cookies, if possible. I want to add a

: user id and password to an access database and check to see if the user is

: there. If the user does not exist, I will send them a message, asking them

: if they want me to add their user id and password.

:

: Simply put, I need the ability to check if the potential customer has

: logged on or not. If they did, I can compare what's in the database to

: their logon. If they did not, I need the ability to request that they add

: themselves.

:

: Thanks for your help!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~










Message #4 by lrosenzweig <rosenzl@o...> on Fri, 16 Nov 2001 16:41:05 -0500
Ken, one more thing. This is really all one page, but it has 2 frames on it.

On the left frame, you can click on a day in a calendar or click on the

current date. The right frame has the schedule, which I am concerned about.

By default, the schedule.asp in the right frame forces the logon. However,

the left frame's 2 options also link to schedule.asp.  Is there an easy way

to just save the user id and password in the database and at the same time,

keep the values that the user originally entered, when it came from the

logon screen?  When schedule.asp is linked to from the left frame, the

schedule.asp does not have the user id and password that the user entered

originally. Therefore, it requests the user id and password again.

Obviously, I am no expert at this stuff.



By the way, you asked what does this have to do with access and asp. It is a

web application using access and asp!



Thanks,



Larry



-----Original Message-----

From: Ken Schaefer [mailto:ken@a...]

Sent: Thursday, November 15, 2001 7:16 PM

To: Access ASP

Subject: [access_asp] Re: Attempting to save User ID and password(Logon)



Larry,



a) Authenticating the user. This is easily done. Get their username/password

combo from fields. See if there is a match in the database. If the resulting

recordset is .EOF then the combination doesn't exist in the database, so ask

them if they want you to add them



b) I don't understand what you're talking about re persistance and cookies.

Unless you want the user to have to authenticate themselves on *each* and

*every* page, you need to use some kind of session state management to track

the fact that they are logged on. You could use a cookie to do this (for

example)



c) I'm not really sure what this has to do with Access and ASP though...



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Larry Rosenzweig" <rosenzl@o...>

Subject: [access_asp] Attempting to save User ID and password(Logon)





: I have an application that when you click on a link, it requests that you

: enter your User ID and Password. What is the easiest way to save the User

: ID and Password?(without persistance and cookies)

:

: I do not want to use Persistance or Cookies, if possible. I want to add a

: user id and password to an access database and check to see if the user is

: there. If the user does not exist, I will send them a message, asking them

: if they want me to add their user id and password.

:

: Simply put, I need the ability to check if the potential customer has

: logged on or not. If they did, I can compare what's in the database to

: their logon. If they did not, I need the ability to request that they add

: themselves.

:

: Thanks for your help!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~










Message #5 by lrosenzweig <rosenzl@o...> on Tue, 20 Nov 2001 12:22:54 -0500
Ken, currently I have put code into my application and added a global.asa

file. At one point it appeared to work, for the most part, but now I am

getting "An exception of type 'Runtime error' was not handled. In Debug, it

points to the Open. This is happening when I "View in browser". I have 2

frames on my page and both are getting the same message. Somehow, I believe

it is related to the global.asa file. Following is the global.asa code and

the code from one frame on the page, with the Open.



Thanks for your help



Larry







Conn.Open sConnect

 Set RS = Server.CreateObject("ADODB.Recordset")

 Set RS=Conn.Execute("SELECT Count(UserSessionID) FROM tblUserPersist WHERE

UserSessionID=" & UserSessionID)

 If Not RS.BOF And Not RS.EOF then

 GetItemCount = RS(0)

 Else

 GetItemCount = 0

 End If

RS.Close

Set RS = Nothing

 Conn.Close

Set Conn = Nothing

End Function



-----Original Message-----

From: Ken Schaefer [mailto:ken@a...]

Sent: Thursday, November 15, 2001 7:16 PM

To: Access ASP

Subject: [access_asp] Re: Attempting to save User ID and password(Logon)



Larry,



a) Authenticating the user. This is easily done. Get their username/password

combo from fields. See if there is a match in the database. If the resulting

recordset is .EOF then the combination doesn't exist in the database, so ask

them if they want you to add them



b) I don't understand what you're talking about re persistance and cookies.

Unless you want the user to have to authenticate themselves on *each* and

*every* page, you need to use some kind of session state management to track

the fact that they are logged on. You could use a cookie to do this (for

example)



c) I'm not really sure what this has to do with Access and ASP though...



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Larry Rosenzweig" <rosenzl@o...>

Subject: [access_asp] Attempting to save User ID and password(Logon)





: I have an application that when you click on a link, it requests that you

: enter your User ID and Password. What is the easiest way to save the User

: ID and Password?(without persistance and cookies)

:

: I do not want to use Persistance or Cookies, if possible. I want to add a

: user id and password to an access database and check to see if the user is

: there. If the user does not exist, I will send them a message, asking them

: if they want me to add their user id and password.

:

: Simply put, I need the ability to check if the potential customer has

: logged on or not. If they did, I can compare what's in the database to

: their logon. If they did not, I need the ability to request that they add

: themselves.

:

: Thanks for your help!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~










Message #6 by lrosenzweig <rosenzl@o...> on Tue, 20 Nov 2001 13:32:56 -0500
Ken, I have been attempting to send you the code in Global.asa, but could

only do it as an attachment.  Wrox will not accept attachments, based on an

email from them. I explained to them that it was the only way that I could

send it. Their response to me was that my comments did not appear to be

ListManager commands. Makes no sense!



Is there a way to get a global.asa file to you as code, not as an

attachment?



Thanks,



Larry



-----Original Message-----

From: Ken Schaefer [mailto:ken@a...]

Sent: Thursday, November 15, 2001 7:16 PM

To: Access ASP

Subject: [access_asp] Re: Attempting to save User ID and password(Logon)



Larry,



a) Authenticating the user. This is easily done. Get their username/password

combo from fields. See if there is a match in the database. If the resulting

recordset is .EOF then the combination doesn't exist in the database, so ask

them if they want you to add them



b) I don't understand what you're talking about re persistance and cookies.

Unless you want the user to have to authenticate themselves on *each* and

*every* page, you need to use some kind of session state management to track

the fact that they are logged on. You could use a cookie to do this (for

example)



c) I'm not really sure what this has to do with Access and ASP though...



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Larry Rosenzweig" <rosenzl@o...>

Subject: [access_asp] Attempting to save User ID and password(Logon)





: I have an application that when you click on a link, it requests that you

: enter your User ID and Password. What is the easiest way to save the User

: ID and Password?(without persistance and cookies)

:

: I do not want to use Persistance or Cookies, if possible. I want to add a

: user id and password to an access database and check to see if the user is

: there. If the user does not exist, I will send them a message, asking them

: if they want me to add their user id and password.

:

: Simply put, I need the ability to check if the potential customer has

: logged on or not. If they did, I can compare what's in the database to

: their logon. If they did not, I need the ability to request that they add

: themselves.

:

: Thanks for your help!



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~











  Return to Index