View Full Version : Information on How to Authenticate a User

12-03-2002, 03:13 PM
Can someone please let me know where I can find information on how to set up my ASP pages and other technical information on how the authentication works with the Update Service? I understand how to set up the Service to authenticate a user, but I cannot find any information on what information will be passed to my asp page. Thanks in advance.

- Domenick Lacertosa

Mark at IS
12-04-2002, 01:17 PM
Open the SDK help, double-click the following Index entry:

Authenticate a customer

and then double-click the following topic in the Topics Found dialog box:

Process an authentication query

Chris Woerner
12-04-2002, 01:18 PM
The following example is from our help docs under the topic: Process an authentication query

Does this give you what you need?

The following ASP script example receives the values UserName and Password, checks them against an SQL database, and responds to the Update Service's query accordingly.

Dim adoRS 'ADODB.Recordset
Dim objConn 'Connection
Dim sql 'SQL Query

Set objConn = Server.CreateObject("ADODB.Connection")

sql = "select UserName, Password , StartDate, ExpiryDate from UserDatabase db where db.UserName='" & Request("UserName") & "' AND db.Password = '" & Request("Password") & "' AND GETDATE() between db.StartDate and db.ExpiryDate"
' Set up the connection
objConn.Open "USERDB", "dbuserid", "dbpassword"
Set objRS=objConn.Execute(sql)

If objRS.EOF Then
Response.Write "FAILED"
' The following text is written to the Update Service user interface
Response.Write "This can happen for any of the following reasons:" & vbCRLF
Response.Write "- Incorrect username" & vbCRLF
Response.Write "- Incorrect password" & vbCRLF
Response.Write "- Your subscription expired" & vbCRLF
Response.Write "OK"
End If