active-directory

Get currently logged in Active Directory user name in ASP.NET

I want to get currently logged in active directory user name/details. Here, User does log in to machine with its AD username and password. How can i get this user name and other details in Global.asax file for Application_AuthenticateRequest() Event. I have used System.Security.Principal.WindowsIdentity.GetCurrent().Name OR HttpConte...

Determine current domain controller programmatically

I need to query current domain controller, probably primary to change user password. (P)DC name should be fully qualified, i.e. DC=pdc,DC=example,DC=com (how to properly name such notation?) How can it be done using C#? ...

Query Active Directory from ASP.NET and bind result to List View

I managed to do ASP.NET authentication work wih AD. Now, I want to query an OU in AD and display the result either ListView or GridView in ASP.NET page. Here's the Domain Controller: dc.itlab.edu The OU: UsersStudents In the organizational unit (OU) UsersStudents there are following columns: First Name, Last Name, Pre-Window...

How to check for user credentials using active directory and a ruby script.

I'm trying write a Ruby script that checks if user credentials are valid using an active directory server. Here's what I've tried so far: require 'rubygems' require 'net-ldap' host = '10.4.1.6' port = 389 username = 'username' password = 'password' ldap = Net::LDAP.new ldap.host = host ldap.port = port ldap.auth "CN=#{username},CN=Us...

How to get all windows groups?

I wrote this to get the groups a particular user belongs to: DirectoryEntry AD = new DirectoryEntry("WinNT://" + Environment.MachineName + ",computer"); DirectoryEntry user = AD.Children.Find(completeUserName, "user"); object obGroups = AD.Invoke("Groups"); foreach (object ob in (IEnumerable)obGroups) { // Create object for each grou...

IIS 7 - Load user profile - To get certificate loading working correctly

We have had this issue where out WCF invokes antother WCF. We are using SSL for securing the transport and are using client certificates for authentication. We get: Could not establish secure channel for SSL/TLS with authority 'XXXXXX'. If we run Internet Explorer on that machine, with the service account that is dedicated to run the ap...

asp.net role provider- get users email address?

i am using role provider and have it managing users on my intranet via their windows logins. how can i pull their email address and maybe some other user content from asp.net using their user info? do i need to hook into active directory? a sample fir this would be great if this is the way to go thanks all ...

Get users email addresses from Active Directory group

Hey, I need some simple test program which will allow me to set AD group name(e.g. testdomain.groupname) and based on this group name it retrieves me all the users(with subgroups as well) email addresses. Any code snippet will be highly appreciated. Thanks ...

In MS Exchange 2003, how do I find out which user deleted an item in a shared calendar?

We have multiple AD users sharing a calendar in MS Exchange 2003. All have read/write access to the calendar. If a calendar appiintment gets deleted, I need to know if there is a way of finding out who deleted it? Any help would be greatly appreciated. Thanks ...

Connect ActiveDirectory with ASP.NET or PHP

Hi Im looking to create a web application using ASP.NET MVC or PHP (not decided yet!) and I want to use the local ActiveDirectory to register users. Can anyone point out how to do this on PHP or ASP.NET? Would like answers on any of the technologies Best regards, David ...

Using Flags in my own C# control such as the settings in UserAccountControl in Active Directory

Hello, I have been working with System.DirectoryServices for a while in a project involving Active Directory. I am curious on the implementation of the UserAccountControl property to control the attributes of a particular account. If I wanted to implement settings in my own applications using a combination of bytes to determine the stat...