G
Guest
I get and error “Some or all identity references could not be translatedâ€
when executes the code System.Security.Principal.SecurityIdentifier.Translate.
It appears this happens to users that have been logged in for a long time.
It appears our users are in the habit of not logging out for long periods of
time.
If the user logs out and then back in the error no longer occurs.
Does any one have any idea what is happening here?
Is the some AD setting that causes tokens to expire after some period of time?
Code snippet:
WindowsIdentity id = WindowsIdentity.GetCurrent();
IdentityReferenceCollection irc =
WindowsIdentity.GetCurrent().Groups;
string[] strArray = new string[irc.Count];
int t = 0;
foreach (IdentityReference ir in irc)
{
IdentityReference account = ir.Translate(typeof(NTAccount));
strArray[t] = account.Value;
t++;
}
when executes the code System.Security.Principal.SecurityIdentifier.Translate.
It appears this happens to users that have been logged in for a long time.
It appears our users are in the habit of not logging out for long periods of
time.
If the user logs out and then back in the error no longer occurs.
Does any one have any idea what is happening here?
Is the some AD setting that causes tokens to expire after some period of time?
Code snippet:
WindowsIdentity id = WindowsIdentity.GetCurrent();
IdentityReferenceCollection irc =
WindowsIdentity.GetCurrent().Groups;
string[] strArray = new string[irc.Count];
int t = 0;
foreach (IdentityReference ir in irc)
{
IdentityReference account = ir.Translate(typeof(NTAccount));
strArray[t] = account.Value;
t++;
}