473,386 Members | 1,823 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,386 software developers and data experts.

Working with Active Users

Hi all,

I am working on a project which checks for windows login and its rights and
then opens up the rest of the forms according to the login and the rights
already set in the windows.

I just know that this can be done using Active Directory Class can anyone
who has worked on it give me web links or few examples to start with.

Thanks
Arvind.
Nov 15 '05 #1
1 1208
Arvind, there are a couple of ways you can do this depending on what you
need exactly. Have you checked out the WindowsIdentity class for instance?
That might have all that you need in it.

If you need to know all of their groups you can do something like this if
you have the user's LDAP/AD path :

string UserPath = "LDAP://cn=Arvind,ou=Dept,dc=Company,dc=com"

// bind to the user
DirectoryEntry User = new DirectoryEntry(UserPath );

// enumerate all the user's groups
foreach(string GroupName in User .Properties["memberOf"])
{
Console.WriteLine(GroupName);
}

--
Greg Ewing [MVP]
http://www.citidc.com

"Arvind P Rangan" <ar******@hotmail.com> wrote in message
news:#P**************@TK2MSFTNGP11.phx.gbl...
Hi all,

I am working on a project which checks for windows login and its rights and then opens up the rest of the forms according to the login and the rights
already set in the windows.

I just know that this can be done using Active Directory Class can anyone
who has worked on it give me web links or few examples to start with.

Thanks
Arvind.

Nov 15 '05 #2

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

Similar topics

1
by: Joe User | last post by:
I have a set of web pages on an AD-authenticated web site that are supposed to allow users to modify their own AD account attributes, limited of course to things like their email address, URL, etc....
5
by: Homer J. Simpson | last post by:
Hi, Any idea to get the -REAL- number of active users -WITHOUT- this kind of code ? ---------------------------------------------------------------------------- --------- Sub Session_OnStart...
4
by: Patrick.O.Ige | last post by:
If i want to generate a menu structure depending on who is logged in in an intranet system(using windows authentication) is it better to use the GROUPS in Active Directory or to move the Active...
0
by: jakobsgaard | last post by:
It is possible to Map a certificate to a Active Directory User Account from DotNet? Please provide an example. Best regards, Ejnar Jakobsgaard...
2
by: HamishC | last post by:
Hi all, I have been knocking my head against this one for a few days -- haven't been able to find a solution to this anywhere so hopefully someone can help. Situation: A really simple LDAP that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
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
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...

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.