473,765 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

connection of ldap with asp.net(c#)

3 New Member
hi...please provide me help in making connection of ldap with asp.net(c#). as i am a newbie so please give the full source code.
thanks in advance... :)
Apr 15 '10 #1
5 7409
tlhintoq
3,525 Recognized Expert Specialist
There is a complete explanation and programmers guide to LDAP on the MSDN site.
http://msdn.microsoft.com/en-us/libr...08(VS.85).aspx

TIP: Performing a google search with "MSDN" and the subject you need help in will usually take you right to the MSDN page. For example I found the above page by Googling for "MSDN LDAP"

From the programming guide provided my Microsoft you should be able to get yourself going. If your code is producing errors you can't find, or not producing the results you were expecting then please feel free to post your code along with any errors or descriptions of how it is not meeting your expectations and someone here (probably many someones) will jump in and help you clean up your code.
Apr 15 '10 #2
Mahak Dhawan
3 New Member
hi thanks for ur reply..can u tell me that when i am specifying the connection string then how to make the path ?
First is O=tboglobal ..under that there are CN and OU..!!!
I want to match the username with the members(cn) inside the OU and CN..!!!
can u pls help me ??
Apr 16 '10 #3
Curtis Rutland
3,256 Recognized Expert Specialist
This is the blog entry I learned how to query Active Directory from several years ago.

I found it through a Google search with the terms: "c# ldap query" which I would suggest you try in the future.

As to the question of us providing help, our purpose here is not to give you the answer, but to help you figure out the answer yourself. We do not believe that doing your work for you makes you a better programmer. That's why we ask that you show us the effort you've made, so we can point out where you've gone wrong and help you do it properly.

Learning comes from effort.
Apr 20 '10 #4
Mahak Dhawan
3 New Member
thanks...
well this is my code...pl temme where am i goin wrong..
Expand|Select|Wrap|Line Numbers
  1. DirectoryEntry entry= new DirectoryEntry("LDAP://geo.l.tboglobal.com:389/OU=GBO,DC=tboglobal,DC=com");
  2.  
  3.          entry.AuthenticationType = AuthenticationTypes.Anonymous;
  4.  
  5.          DirectorySearcher searcher = new DirectorySearcher(entry);
  6.          searcher.PropertiesToLoad.Add("cn");
  7.  
  8.  
  9.          SearchResultCollection results = default(SearchResultCollection);
  10.          results = searcher.FindAll();
i am getting an error-"parameter incorrect"
Apr 23 '10 #5
mikee1504
1 New Member
I suspect the answer is no longer relevant but the error generated can be a result of either LDAP not accepting anonymous auth OR the LDAP conn string is incorrect.
Aug 4 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2916
by: Subu Anantharam | last post by:
I have a .NET app that connects to a third-party server on a socket and sends data. This works with a test server on the local network, but does not work across the frame connection to the third-party server. They see a connection, but never see any data coming across. This works with Win32 app using winsock. However, if I use and call a Win32 dll that uses Winsock from my ..NET app, it does not work. Is there some setting in .NET...
1
5096
by: Bruno Renato | last post by:
Hy I was development a program and one of your functions are make a PPPOE connection, but I don't found any information about this in the internet, somepeople have some information for this process??? tks -- C# .NET Developer
2
2427
by: Mahesh Devjibhai Dhola | last post by:
Hi, I want to develop p2p (peer-to-peer) communication connection for chat in ..Net (Lang: c# - preferable) NOTE: if two LAN are behind their own router then also it should work as yahoo, msn messenger works. Let me explain scenario: In yahoo: - We login to yahoo server from yahoo messenger (yahoo server listens at
2
3052
by: Rig76 | last post by:
I'm having a very strange issue with an application I'm building. The applicaiton has multiple users, each with their own connection to the database. However, when one of these connections closes then all the other users connections seem to close. This is most obviously seen when I'm writing a rather large chunk of data with connection A. Then connection B comes in to the application and grabs a small piece of data. Of course, during...
5
1312
by: john andrew | last post by:
-- hello I am a little confused. I have VB.net (standard) was under the impression it didnt have any databse connection functions.(no ADO connection) 1) Can I connect to an Access database and with textbox or grid, navigate through the records using code and perform add/del/edit on the data with VB.net standard. (I just need a yes or no answer)
7
5597
by: Brad | last post by:
I have several web apps which download content to client (pdf, tif, etc) by writing out content in an aspx page. I've recently upgraded these from 1.1 to 2.0....and they all seem to work fine except that every now and then the apps raise the following error (our apps email us when an error occurs): ================================== The remote host closed the connection. The error code is 0x80072746. Stack at...
3
5764
by: Mad Scientist Jr | last post by:
I am getting the following error when trying to access a database with a trusted connection: "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." My connection string is: "Server=MyServer; Database=MyCatalog; Trusted_Connection=True;"
1
2864
by: webmaster | last post by:
Request for assistance: I'm in process of writing a PoP3 class in VB.NET 2 (VS 2005), and have successfully managed to create a sub which will create a connection to a PoP3 server on port 110 to download any waiting messages. I don't want to use a pre-built component if at all possible. The following code initiates the connection to the server and opens the stream for input.
7
2660
by: kafain | last post by:
Hi, I recently installed mysql using the connection: server: localhost port: 3306 username: root password: SOMETHING If I connect through mysql admin, I can see the databases I created.
0
2199
by: imonline | last post by:
Hi, I have created a asp.net page which posts XML on the web service using .net 2.0. The page and the webservice was working fine but once I converted them to .net 3.5 I have been getting following exception. And I am having this problem on the local machine that is both of them on same machine. Exception: System.Net.WebException was caught
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9957
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5276
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.