Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 12th, 2004, 10:49 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default Windows Domain

I'm developing an application that will grant access to specific crystal reports based on what groups a user is a member of. I want to use as a user list, all the users in a Windows Domain - are there any .NET classes that grant access to this? I'm searching the documentation as well, but that doesn't seem to have the information I require (though probably I'm looking in the wrong place).

Thanks

 
Old March 19th, 2004, 04:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

if I understand you properly- you want to know how to determine what groups a specified user is in?


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old March 19th, 2004, 06:37 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What is your Back end Database?



Sal
 
Old March 22nd, 2004, 04:54 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Nope, just needed a way of getting all users in a domain. I've worked it out now using System.DirectoryServices namespace, that bundles all the ADSI COM stuff. Back-end database will probably be either SQL Server or MySQL (once SourceForge sort out their .NET data provider for MySQL!)

Thanks for the responses!

 
Old March 22nd, 2004, 03:01 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just use windows authentication with SQL Server. This will allow you to use the current domain users for security. If a user does not have access to the report, it will not open with data anyway.

With this you can grant privileges to the windows groups as well, and it simplifies security development.



Sal
 
Old March 23rd, 2004, 04:38 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I shouldn't have said groups, it is somewhat misleading. Basically, I'm developing a new database to manage what crystal reports someone has access to. To do this, I will use their windows username (read using the system.securityprinciple you mentioned) and interrogate a 'groupmembership' table in my database, which provides a many-to-one relationship back to the 'groups' table in the same database. Because I was using a windows username, I needed to get a list of all users in the domain, so I could build the 'groupmembership' table - one user has many groupmemberships, one group has many groupmemberships. I just didn't know how to get at a list of users in a domain, having never used ADSI before!

Thanks,

Jaucourt






Similar Threads
Thread Thread Starter Forum Replies Last Post
Same pages for sub domain from main domain vivek_inos ASP.NET 1.0 and 1.1 Professional 1 February 13th, 2007 10:15 AM
WINDOWS AUTOLOGIN USER-DOMAIN! BunnyFace Pro VB 6 0 January 9th, 2005 08:15 PM
How to create a new user in Windows domain iteamicp2p Classic ASP Components 1 October 5th, 2004 09:11 AM
http://domain or http://www.domain anshul HTML Code Clinic 9 August 11th, 2004 01:09 AM
ASP.NEt, creating new user on Windows 2000 Domain sstoutkc Classic ASP Components 2 April 29th, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.