Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Fri, 2 May 2008 03:36:01 -0700,    group: microsoft.public.dotnet.security        back       


IsInRole() local group vs domain group   
Security Newbie:

I am logged into my PC as local Administrator whether I use my PC locally or 
in the office. 
The PC is configured to connect to the domain when being in the office.

The following lines
Dim myDomain As AppDomain = Thread.GetDomain()
myDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal)
If Not Thread.CurrentPrincipal.IsInRole(WindowsBuiltInRole.Administrator) Then

IsInRole() throw an exception which says (I translate): "no trusted 
connection with domain"
which is correct as I work at home.

Question: How do I direct the IsInRole() property to always check *local* 
roles ?

thanks herbert
date: Fri, 2 May 2008 03:36:01 -0700   author:   herbert

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us