Solved

NTAccount Translation seconds after account has been created c#

Posted on 2010-08-17
2
729 Views
Last Modified: 2012-05-10
Hey all I am getting the following error, what I am doing is creating an account in the AD then a split second later creating their home folder. Another split second later I am assigning the permissions to the folder but for some reason I can not translate the account. Do I need to wait a set time?

17/08/2010 09:00:43: Permissions: EB0849758 FAILED - 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.CommonObjectSecurity.AddAccessRule(AccessRule rule)
   at System.Security.AccessControl.FileSystemSecurity.AddAccessRule(FileSystemAccessRule rule)
   at KazooSoft.FolderPermissions.AddFolderSecurity(String folderName, String account, FileSystemRights rights, AccessControlType controlType) in \\ncs-srv09\staffhomes$\schurch\My Documents\Visual Studio 2010\Projects\KazooADIntegrationUtility\KS-FolderPermission.cs:line 68
0
Comment
Question by:KazooSoft
2 Comments
 
LVL 12

Accepted Solution

by:
Rant32 earned 500 total points
ID: 33454551
Yes, it is possible that the domaincontroller that authenticated your fileserver has not received the update for the new user account yet. This is normal behaviour.

Within a 2003 AD site, any domain controller waits 15 seconds before sending an update notification to its replication partners, with a maximum of 3 hops. Reference: http://technet.microsoft.com/en-us/library/cc728010%28WS.10%29.aspx

Instead of waiting for a random interval, you may catch the specific exception and retry after 15 seconds.
0
 
LVL 4

Author Comment

by:KazooSoft
ID: 33454815
Cheers Rant, that's what I ended up doing.
0

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ACTIVE DIRECTORY 4 25
active directory 3 27
IT Contract Fee 17 85
Fun question about Windows Server licenses and CALs 3 13
Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now