Solved

NTAccount Translation seconds after account has been created c#

Posted on 2010-08-17
2
736 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

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
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 …

785 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