salve a tutti
dato il seguente codice .:
codice:
<authentication mode="Forms">
<forms name="appNameAuth" path="/" loginUrl="login.aspx" protection="All" timeout="30">
<credentials passwordFormat="Clear">
<user name="jeff" password="test" />
<user name="mike" password="test" />
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" />
</authorization>
codice:
If FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtUser.Text, chkPersistLogin.Checked)
Else
ErrorMessage.InnerHtml = "Something went wrong... please re-enter your credentials..."
End If
se lo provo nel mio progetto funziona bene, ma invece di avere i nomi degli utenti nel web.config li ho nella mia tabella di sql server, come faccio a farmi una select e gestirmi l'autenticazione a mano???
non vorrei usare le session, ma neanche il controllo login fornito da visual studio,
pero' mi interessa gesire l'autenticazione!!!
grazie