Bonjour J'utilise une page pour m'authentifier à une base access. J'utilise un formulaire login / password en methode POST
Lorsque j'essai de m'identifier, le serveur me répond HTTP 500 qui caractérise une erreur de programmation....
voici le code de mon script de validation
J'ai cherché dans ce forum et trouvé la même méthode de connexion...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 <% Response.Buffer=true 'Ces trois lignes de code nous assure que la page n'est pas dans le cache du client. Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 Dim userid Dim Pwd 'Assign the UserID, which the user supplies, to this variable. userid= Request.Form("UID") 'Check whether userid is an empty string. If it is empty, redirect to identification.asp. 'If it is not empty, connect to the database, and validate the user. if userid <> "" then pwd = Request.Form("passwd") Dim Cn Dim Rs 'Specify the connection string to access the database. 'Remember to change the following connection string parameters to reflect the correct values 'for your SQL server. Ouverture de la BD Set Cn = Server.CreateObject("ADODB.connection") Cn.Open "Driver={Microsoft Access Driver (*.mdb)};"&_ "DBQ=\\MaBase.mdb;" Set Rs= Server.CreateObject("ADODB.recordset") Rs.open "Select * from L050_CONTACT_TEST where ""Login"" ='" & userid & "'",Cn 'Check to see if this userID exists in your database. If Not Rs.EOF then If strcomp( pwd, Rs.Fields("Password").value , 1) = 0 then 'Password is correct. Set a session variable, and redirect the user to a Default.asp page 'or the main page in your application. Session("UID") = userid Response.Redirect "Cbon.htm" Response.End Else 'Password is incorrect. Redirect the user to the logon page. Response.Redirect "identificationExtranet.asp" Response.End End if Else 'If the user is not in your database, point him or her to the Register.asp page 'so that he or she can register at your Web site. Response.Redirect "identificationExtranet.asp" Response.End End if Else Response.Redirect "identificationExtranet.asp" Response.End End if %><head><title>Page de validation</title></head>
Pouvez vous me dire là ou j'ai tout faux..
Merci
Partager