How to check the username with active directory and fetch the user details from the active directory?

I  have a textbox with a submit button.When the admin types the username in the textbox and submits it has to check with active directory and fetch the firstname and last name of the user entered inthe textbox.How will i do this one.Code is appreciated.
0
ramesh1520
2/19/2008 2:40:36 AM
asp.net.security 27051 articles. 1 followers. Follow

1 Replies
1236 Views

Similar Articles

[PageSpeed] 4

you will find lot of samples if you search for "ActiveDirectory using .NET"

but here is a verysimple code and it works too:-)

strLANID = "ADDomainName\user"

          Dim dservices As New System.DirectoryServices.DirectoryEntry
            Dim objDirEnt As System.DirectoryServices.DirectoryEntry = New System.DirectoryServices.DirectoryEntry("LDAP://CN=Test,DC=ADDomainName")

            If dservices.Exists("WinNT://" & strLANID) Then
                Dim dServObj As New System.DirectoryServices.DirectoryEntry("WinNT://" & strLANID)

                UserName = dServObj.Properties("FullName").Value
            End If

 


HTH
Thajeer

"Dont forget to click "Mark as Answer" on the post that helped you. This marks your thread as Resolved and the community will know you have been helped."
0
thajeer
2/19/2008 4:08:44 AM
Reply:

Similar Artilces:

Understanding the Security Implication of Active Directory Default Settings Part II of An Audit of Active Directory Security
http://www.securityfocus.com/focus/microsoft/aads2.html -- Regard: Joh@nnes� 1216771 Ont.Inc. "Nothing is more damaging to a new truth than an old error" ...

Is there a way to authenticate Active Directory users from multiple Active Directory Domains
Is there a way to authenticate Active Directory users from multiple Active Directory Domains in ASP.NET Application using C# or VB.NET?Suppose I have a LoginId "user1" from one of the three Active Directory Domains how can I authenticate it?I have two Active Directory domains. I can authenticate from the Active Directory Domain where my current system Account is logged in. But I can not authenticate from other Active Directory Domains. Actually I have 2 Active Directory domains in my LAN.Kamran ShahidSr. Software Engineer(MCP,MCAD.net,MCSD.net,MCTS,MCPD.net[web])Netprosys Inc.ww...

Active Directory user home directory
Hi all. I have a question, how to sync home directorires of users from Identity Vault to Active Directory? Into AD there are 2 LDAP attributes calleds homeDrive (the network drive letter) and homeDirectory that is the network path used to map during user login. My doubt is about the eDirectory volume information. The volume will be not sync to the AD because AD does not recognize this information, right? So, how to sync? I was thinking about create 2 eDirectory attributes where I can write theese informations. What do you think about this? Anyone can help me? Best regards...

Active Directory
Could somebody please point me in the right direction?  I'm attempting to make a website pulling information from active directory.  I am able to pull specific user information using VBS but am very lost as to how to port this type of stuff over to a website.  Could somebody please post some examples or websites showing how to display maybe just all users from AD? Thanks so much. ...

check users in Active Directory
Hello, I need to get user name and password from our internet and check Active Directory if the user name is available in the network and password matches, how should I do this and is there a C# code? Thanks, Jim. Jim, userPassword is a write-only field. So the best thing you can do is search for the user name and then try a logon, force a bind by calling NativeObject, with the user credentals. If the logon is sucessful, then the passwords match. With a bit of searching you can find some code that will get you started, here is an example of a logon method: NTLM Bill Be...

Checking if user is valid in Active Directory
Hi there I have tried every thing to solve my problem but yet no luck, so please if any one could help, please do... I am trying to read the given name of login users from active directory using asp.net 2.0.. First the structure of my active directory is ***.***.col/Staff/College Staff/Individuals all users are stored in the net domain. All users are stored in the group individuals. The coding below when read only return false.. this code I am using first only checks if the user exists. //=========== FUNCTION TO CONNECT TO AD =====Public Shared Function GetDirectoryEntry() As Director...

Problem retrieving Active Directory user details
Hi allI am trying to retrieve active directory details based on the user's nt username. I am using the following code (used from the following .NET forums post: http://forums.asp.net/988407/ShowPost.aspx). All works well until it gets to defining the SearchResultCollection object from the FindAll method, it gives a "Login Failure: unknown user name or bad password" error. Dim adPath As String = "LDAP://SERVER_NAME/DC=ntdomain" Dim name As String = HttpContext.Current.User.Identity.Name Dim sFilter As String = String.Format("(&(objectCategory=person)(sAMAccountName={0}))", name.Split(N...

Login that checks users aganist Active Directory
I currently have an active directory set up on a server I'm creating a new website that I want people to log into. I want it to check against the users currently in my active directory on a remote server, is this possible?   Yes, it is possible.If your webserver is part of the domain you could use windows authenticationhttp://msdn.microsoft.com/en-us/library/ms998358.aspx http://msdn.microsoft.com/en-us/library/aa480475.aspx Or you could authenticate against an AD server but use forms authentication to allow users to enter the credentials.http://msdn.microsoft.com/en-us/library/...

Trying to check Active Directory for a user ID
I used the LdapAuthentication class show on msdn at http://msdn2.microsoft.com/en-us/library/ms180890.aspx This is for a webapp i'm creating for someone to add a user to an application security db.  It's just giving users access to applications.  I just want to verify that the user id being entered, is in AD.  I tried modifying the IsAuthenticated method given, to just take parameters of domain and username, excluding password.  When I get to the line to bind the native adsobject, I get this error:  "The specified directory service attribute or value does not exist"...

updating active directory user profiles with.net
hi all; i'am using this forum first time. i like this very much. i have a questions abut active directory with .net. so i wanna updating user profiles using asp.net. for example there is a computer laboratuar , a windows 2003 server and a web page that using active directory accounts to authenticate system. for example me. i wanna updating my profile using web page , if i authenticated system. i hope, i can tell my questions:) 'cause my english not good. thanks.Mesut KOSUCUSoftware Engineer...

Net::LDAP, Active Directory and Disabled Users
------_=_NextPart_001_01C386CB.502F3B30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I've been trying to write a simple perl script that will query the = active directory via LDAP and give me a list of email addresses for disabled = users (eg, addresses we don't want to accept email for anymore). I found a = website or two that suggested I use the following as my filter: (&(objectCategory=3Dperson)(userAccountControl:1.2.840.113556.1.4.803:=3D= 2)) I was beginning to think these websites were wrong as whene...

Active Directory And Directory Information
Hi Guys,  i need a help here.my Situation is as follow: 1. i have developed a webpart for retrieving Active Directory of a user and another webpart to retrieve a Folder owner in our file server. Now both webparts are working in a visual studio environment ( When we click 'start debuging' ).But when i have deployed to my IIS, both webparts just like a cat and a dog. When i set <impersote=true> My AD webpart is working but not the FolderOwner Webpart.if i set it to false, the My AD webpart is not working but the FolderOwner webpart is working.  Do you have any ide...

E Directory and Active Directory
Does Novell have a product that would synchronize E Directory and Active Directory? I was given the task to research and see if it is possible. Thanks Jim http://www.novell.com/products/dirxml/ -- Shaun Pond , > Does Novell have a product that would synchronize E Directory and Active > Directory? I was given the task to research and see if it is possible. > Yes. DirXML - Anders Gustafsson, Engineer, CNE6, ASE NSC Volunteer Sysop (http://support-forums.novell.com) Pedago, The Aaland Islands (N60 E20) Using VA 4.52 build 277 (32-bit) on Windows...

E-directory and Active Directory
I would like to be able to create an account in Active Directory and have it automatically update e-directory. Is this possible? I've heard of making your Netware server appear to be a Windows DC, but will this allow the two directory services collaborate? Is there a "how to" that steps you through setting up your Netware server this way? Thanks, linuxfish wrote: > I would like to be able to create an account in Active Directory and > have it automatically update e-directory. Is this possible? I've heard > of making your Netware server appear to be a ...

Web resources about - How to check the username with active directory and fetch the user details from the active directory? - asp.net.security

Wikipedia:Quick directory - Wikipedia, the free encyclopedia
This page is a handy directory to various locations of interest in Wikipedia. Only dynamic pages should be listed here, no policy pages etc. ...

Wikipedia:WikiProject Council/Directory - Wikipedia, the free encyclopedia
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. , a non-profit organization.

Business Directory Listings: Eight Smart Tips for You to Get Started
If you are considering a business directory listing for your small business, congratulations – you are on the right track. Local SEO, local customers, ...

LinkedIn Lookup iOS app aims to replace your company’s awful intranet employee directory
... continue reading at 9to5Mac . What do you think? Discuss "LinkedIn Lookup iOS app aims to replace your company’s awful intranet employee directory" ...

Atlas Partner Directory Launched
... just for Facebook and Instagram –advertising platform Atlas has one, as well. On that note, Atlas Tuesday introduced the Atlas Partner Directory ...

Slack announces App Directory store
... create more apps for the store, and a new framework called Botkit which should simplify the process of creating apps. The Slack App Directory, ...

The British Library’s ‘Save Our Sounds’ Program Creates Directory of UK Sound Collections
The long-feared deterioration of the world's sound collections is a coming to a head with the British Library's last-ditch initiative called ...

Researchers show how to steal Windows Active Directory credentials from the Internet
... showed at the Black Hat security conference. The attack, called an SMB relay, causes a Windows computer that's part of an Active Directory ...

Researchers find way to steal Windows Active Directory credentials from the Internet
The technique could enable attackers to attack Windows servers hosted in the cloud

Slack's App Directory proves it's more than just a chatroom
... are about to get a little easier to find and integrate within your team and over 160 of them live within the company's new Slack App Directory. ...

Resources last updated: 12/20/2015 5:34:12 PM