Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
ASP.NET 2.0 / 3.5 / 4.0
LDAP
martedì 29 marzo 2011 - 15.40
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
Elenco Tags
VB.NET
|
.NET 2.0
|
Visual Studio 2005
sorigrafia
Profilo
| Junior Member
71
messaggi | Data Invio:
mar 29 mar 2011 - 15:40
Ciao ragazzi....sto sbattendo la testa con LDAP e l' autenticazione con certificati.
L' autenticazione semplice, senza certificati, sono riuscita a farla. Non riesco e non so capire dove posso sbagliare, anche con i certificati non ho esperienza anche se , nel debug, vedo che vengono letti correttamente.
Dim Ldap As System.DirectoryServices.Protocols.LdapConnection = New System.DirectoryServices.Protocols.LdapConnection(New LdapDirectoryIdentifier("LDAPS://ldap-test2:636", True, False))
Ldap.SessionOptions.ProtocolVersion = 3
Ldap.SessionOptions.SecureSocketLayer = True
Ldap.AuthType = AuthType.Basic
Ldap.SessionOptions.VerifyServerCertificate = New VerifyServerCertificateCallback(AddressOf ServerCertificateRoutine)
'---------------------- 2.2
'apro lo store dei certificati
Dim mystore = New X509Store(StoreName.My, StoreLocation.LocalMachine)
mystore.Open(OpenFlags.ReadOnly)
Dim cert As New X509Certificate2
Dim cert1 As New X509Certificate2
Dim cert2 As New X509Certificate2
Dim certFounded As Boolean = False
'cerco il certificato che mi interessa
For Each cert In mystore.Certificates
If cert.Subject.Contains("XXX") Then
cert1 = cert
End If
certFounded = True
Next
'se non lo trovo esco
If Not certFounded Then
Exit Function
End If
Ldap.ClientCertificates.Add(cert1) <---- CERTIFICATO LETTO E AGGIUNTO
'Bind
Ldap.Bind(creds) <--- CREDENZIALI VALIDE (LE STESSE CHE MI FANNO ACCEDERE CON UN AUTENTICAZIONE SEMPLICE)
Al momento di eseguire il .bind pero mi ritorna un messaggio "Server LDAP non disponibile"
Ldap.Dispose()
grazie mille
--
AirLainz
totti240282
Profilo
| Guru
1.574
messaggi | Data Invio:
mar 5 feb 2013 - 11:54
Sono interessato anche io ad usare Ldap, puoi darmi qualche info in merito ?
Grazie.
C'è solo un capitano !!!!!!
gabrielemacs
Profilo
| Newbie
2
messaggi | Data Invio:
mar 7 gen 2014 - 12:30
Salve! Per caso qualcuno è riuscito a risolvere questo problema? Mi succede la stessa identica cosa e quindi mi sarebbe utile.
Grazie mille!
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !