473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

connexion LDAP en ASP classic avec un composant .NET

Bonjour,

J'ai créé un assembly .NET pour exploiter un annuaire LDAP, voici les lignes
codées en C# pour s'y connecter :
//Ouverture du LDAP
System.DirectoryServices.DirectoryEntry l_ldap = new
System.DirectoryServices.DirectoryEntry(sLdapUrl, userName, passWord);
//Recherche dans le LDAP
System.DirectoryServices.DirectorySearcher l_drcSearch = new
System.DirectoryServices.DirectorySearcher(l_ldap,
"(&(objectClass=user)(sAMAccountName="+idActiveDir ectory+"))");
System.DirectoryServices.SearchResult resSearch = l_drcSearch.FindOne();

L'appel de la méthode contenant ces lignes de code en ASP .NET ne pose pas
de pb.
Cependant dans une feuille ASP classic après avoir fait un regasm sur mon
assembly et l'avoir copié dans System32, je fais :

Set o = Server.CreateObject("monNameSpace.maClasse")
Set val = o.selectionnerUtilisateurDansAnnuaire("login")

l'appel de la méthode me génère sur l'execution de la ligne
l_drcSearch.FindOne(); une COMException "Mécanisme d'authentification
inconnu"

Je signale que l'appel d'autres méthodes fonctionne.
La seul différence entre l'appel en ASPNET et ASP est que le processus
appelant n'est pas le même.

Quelqu'un aurait-il un idée?
Merci.
Nov 16 '05 #1
1 4532
Bonjour,

Cela peut venir de l'absence de spécification du mode d'authentification sur
l'objet DirectoryEntry.
Essayez: l_ldap.AuthenticationType=AuthenticationTypes.Secu re (ou passez
cette valeur en troisième paramètre du constructeur de la classe
DirectoryEntry.

"Claude Cap" <no****@nospam.com> wrote in message
news:eo**************@TK2MSFTNGP10.phx.gbl...
Bonjour,

J'ai créé un assembly .NET pour exploiter un annuaire LDAP, voici les lignes codées en C# pour s'y connecter :
//Ouverture du LDAP
System.DirectoryServices.DirectoryEntry l_ldap = new
System.DirectoryServices.DirectoryEntry(sLdapUrl, userName, passWord);
//Recherche dans le LDAP
System.DirectoryServices.DirectorySearcher l_drcSearch = new
System.DirectoryServices.DirectorySearcher(l_ldap,
"(&(objectClass=user)(sAMAccountName="+idActiveDir ectory+"))");
System.DirectoryServices.SearchResult resSearch = l_drcSearch.FindOne();

L'appel de la méthode contenant ces lignes de code en ASP .NET ne pose pas de pb.
Cependant dans une feuille ASP classic après avoir fait un regasm sur mon
assembly et l'avoir copié dans System32, je fais :

Set o = Server.CreateObject("monNameSpace.maClasse")
Set val = o.selectionnerUtilisateurDansAnnuaire("login")

l'appel de la méthode me génère sur l'execution de la ligne
l_drcSearch.FindOne(); une COMException "Mécanisme d'authentification
inconnu"

Je signale que l'appel d'autres méthodes fonctionne.
La seul différence entre l'appel en ASPNET et ASP est que le processus
appelant n'est pas le même.

Quelqu'un aurait-il un idée?
Merci.

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: cyril | last post by:
Bonjour à tous, j'utilise Apache php et mysql sans probleme, j'ai voulu passer pour des raisons pro sur IIS PHP MS SQL.IIS et PHP fonctionne bien, j ai decommenté la ligne pour ms sql, copier la...
2
by: elsC | last post by:
Bonjour, Je viens d'installer SQL Server 2000 Dev edition. J'ai créé des connexions sécurisées SQL Server et pourtant lorsque j'essaie de me connecter avec PHP (mssql_connect('localhost',...
9
by: jab | last post by:
Je veux lier (join) une table qui se trouve dans une database avec une qui se trouve dans une autre database. Les 2 databases sont sur le même serveur en l'occurence DB2/NT 7.2.9. J'ai créé un...
1
by: eric lecocq | last post by:
Salut, mon problème est le suivant: j'ai une DB avec des liens vers des fichiers texte. je voudrais savoir comment je fais pour pouvoir dire à Access qu'un champ de type date peut être vide ?...
1
by: DarthDaddy | last post by:
I am using a non-Microsoft LDAP server, but it IS v3 compliant. I need to create an ASP page to connect to the LDAP server for user authentication. I have experience with VB & ASP. I have...
3
by: aydeejay | last post by:
I'm trying to troubleshoot an issue where users are not able to bind with LDAP via "GetObject" through our ASP Classic Intranet if they stay logged in overnight (beyond their allowed login hours). ...
7
by: MrHelpMe | last post by:
Sorry everyone, NOTE: I have posted this question to another site but unfortunately, am not getting the answers I need only because those helping haven't worked with ASP. I am in desperate...
2
by: sal21 | last post by:
In asp classic no NET! Usign LDAP or ADSI i know: my server is server NT name of domain=dip name of group=my_group name of user=my_user
0
by: tsic | last post by:
Bonjour, Voilà, j'ai débuté recemment avec python et je veux faire une connexion client serveur (windows) par l'intermédiaire d'une interface QT Designer v 4. j'ai choisi ERIC v 4 comme IDE. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.