Role based security and Domains
From: Sammy_63 (anonymous_at_discussions.microsoft.com)
Date: 05/19/04
- Next message: anon: "How can I setup SSL on my LOCAL COMPUTER?"
- Previous message: Jéjé: "accessing remote OLAP cube through WSS cause an error..."
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Role based security and Domains"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Role based security and Domains"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 18 May 2004 16:36:02 -0700
Does any one know how to find my windows domain name with .Net ?
Here's what I'm trying to do, I'm implementing role based security by calling WindowsPrincipal.IsInRole. This requiers the group names to be passes as DOMAINNAME/GROUPNAME. I use the same group names at all the installations but the domain names are obviously diffrent at seach site. I'm trying to avoid hardcoding or manually configuring the domain name for each site.
I'd like to do something like this:
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal)
Dim Prin as WindowsPrincipal
prin = Thread.CurrentPrincipal
domainName = get_domain_name()
bAuthenticated = prin.IsInRole(domainName & "\" & GroupName)
I tried SystemInformation.UserDomainName.ToString() But it returns the server name not the domain name.
Any Ideas would be greatly appreciated,
Thanks
Sam
- Next message: anon: "How can I setup SSL on my LOCAL COMPUTER?"
- Previous message: Jéjé: "accessing remote OLAP cube through WSS cause an error..."
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: Role based security and Domains"
- Reply: Joe Kaplan \(MVP - ADSI\): "Re: Role based security and Domains"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|