ensto28
Messages postés87Date d'inscriptionjeudi 28 mai 2009StatutMembreDernière intervention23 mars 2011
-
27 avril 2009 à 12:33
titeoe
Messages postés433Date d'inscriptionsamedi 26 avril 2003StatutMembreDernière intervention 4 décembre 2009
-
28 avril 2009 à 00:48
authentification (sql server 200)
voila le code:
Dim cn As String = "server=localhost;uid=sa;pwd=;database=Lom"
Dim user As String = TextBox1.Text
Dim pass As String = TextBox2.Text
Dim strhash As String = FormsAuthentication.HashPasswordForStoringInConfigFile(pass, "SHA1")
Dim bn As Boolean = False
Dim strsql As String = "select motdepasse from users where nom='" & user & "' and motdepasse='" & pass & "'"
Dim cnn As SqlConnection = New SqlConnection(cn)
Dim cmm As SqlCommand = New SqlCommand(strsql, cnn)
cnn.Open()
Dim dr As SqlDataReader
dr = cmm.ExecuteReader()
If (dr.Read()) Then
bn = True
End If
dr.Close()
cnn.Close()
If bn Then
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, False)
Else
MsgBox("wa login 9a3 mardame ach hadchi ")
End If
2.et voila el message d'erreur :
Échec de la connexion de l'utilisateur 'sa'. Raison : Non associé à une connexion sécurisée SQL Server.
aide mois svp