ntaccaunt.translate and AD



Hi,

problem:

when I create user or group I want to set permissions on OU for that user or group.
But I'm getting error if I don't put some sleep 20-30 sec.

Like user or group doesn't exist and I can't do translate.
Like there is some problem with replication of data and I need to bind to DC on which I created user or group and do translate.
But I don't know how.

Can someone help or suggest something??

ERROR :

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 serviceprovisioning.ActiveDirectory.NTaccountToSID(String strNTaccountName, String strADDomain) in C:\Users\darko\Documents\Visual Studio 2008\Projects\serviceprovisioning\serviceprovisioning\functions\ActiveDirectory.vb:line 237


CODE :

Function NTaccountToSID(ByVal strNTaccountName As String, ByVal strADDomain As String) As SecurityIdentifier

Dim identity As New NTAccount(strADDomain, strNTaccountName)

line 237 --> Dim SID As SecurityIdentifier = DirectCast(identity.Translate(GetType(SecurityIdentifier)), SecurityIdentifier)

Return SID

End Function


.



Relevant Pages

  • Re: internationalisation
    ... affects the whole string (like replacing all vowels with accented ... variants). ... And translate what bothers you most. ...
    (microsoft.public.vc.mfc)
  • Re: Musings on a holiday weekend
    ... If the native coding of U/OS is to be UTF-16, I'd expect that all of the files would also have to be UTF-16. ... CLST - Compare Logical STring ... MVCLE - MoVe Character Long Extended ... TRTR - TRanslate and Test Reverse ...
    (bit.listserv.ibm-main)
  • Re: namespaces
    ... >> import string ... >> No pollution. ... namespace pattern instances ... >> def translate(text) ...
    (comp.lang.python)
  • Re: Problem with -3 switch
    ... refers to prepending a u to strings to make them unicode objects, ... It's not designed to translate arbitrary 2.6 code, ... to talk about string constants specifically, ...
    (comp.lang.python)
  • Re: Ada to C++ translator
    ... > of Ada. ... The data sheet focuses on type conversions between Ada and C++. ... which is the same as the C string type. ... There is also no indication they can translate concurrent programs. ...
    (comp.lang.ada)

Quantcast