Some or all identity references could not be translated.
- From: "Darko Bazulj" <darko.bazulj@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Jun 2008 22:24:13 +0200
Hi,
what I try to do:
create user/group in AD(works fine).
set permissions on folder for created user/group(problems)
If I try that I get the following error:
System.Security.Principal.IdentityNotMappedException: Some or all identity references could not be translated.
at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess)
at System.Security.Principal.NTAccount.Translate(Type targetType)
at System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified)
at System.Security.AccessControl.ObjectSecurity.ModifyAccessRule(AccessControlModification modification, AccessRule rule, Boolean& modified)
If I try set permissions for same user/group about 30 seconds after creation everything went fine.
CODE:
Dim identity As NTAccount
identity = New NTAccount(strUserName)
Dim dInfo As New DirectoryInfo(strFolderName)
Dim dSecurity As DirectorySecurity = dInfo.GetAccessControl(AccessControlSections.Access)
dSecurity.AddAccessRule(New FileSystemAccessRule(identity, _
rights, _
iFlags, _
pFlags, _
acType))
dInfo.SetAccessControl(dSecurity)
Can someone help, suggest something??
.
- Follow-Ups:
- Re: Some or all identity references could not be translated.
- From: Joe Kaplan
- Re: Some or all identity references could not be translated.
- Prev by Date: system.security.accesscontrol question
- Next by Date: Re: Some or all identity references could not be translated.
- Previous by thread: system.security.accesscontrol question
- Next by thread: Re: Some or all identity references could not be translated.
- Index(es):
Relevant Pages
|