Note that there are some explanatory texts on larger screens.

plurals
  1. POPrincipalOperationException 1355 but WireShark indicates success
    primarykey
    data
    text
    <p>I have an application that performs a <code>UserPrincipal</code> (and <code>GroupPrincipal</code>) <code>FindByIdentityWithType</code> outside the applications domain. This worked until last week. Since then I installed Visual Studio 2012 on my development machine and my code stopped working with a <code>PrincipalOperationException</code> {"Information about the domain could not be retrieved (1355)."}. The windows error number is 80131501</p> <p>I have no idea if there is a correlation between VS2012 installation, some security update and the appearance of this error.</p> <p>I use SimpleBind at creation of the context and using the same settings in ADSIEdit to access the domain is still working.</p> <p>I captured WireShark during an application test and: The TCP/LDAP packages indicate success! I receive the LDAP search result packet and can see that it's content is correct in wireshark. You can see the searchRequest and the searchResponse in wireshark - the values for the request are correct and the request is answered with the right directory object. 3 or 4 packets before I am getting the error I can see that there is a port altering in the ldap traffic between my client and the 2008R2 server. The client is Windows7 (I have no firewalls on and I tried with disabled virus scanner).</p> <p>I guess there is might be a problem later when System.DirectoryServices.AccountManagement instantiates the UserPrincipal (I tried this one as I suspected some of my UserPrincipalEx properties can be the reason for the exception). This guess is based on the fact that the ldap query is performed and answered fine.</p> <p>I know that you never can executed methods like <code>MemberOf</code> on the DirectoryObject if your client is not trusted to that domain. But simple instantiation of UserPrincipal worked for me for months until today.</p> <p>I use hosts entries instead of DNS in my development environment. It worked for months. The server has no DNS knowledge of the client and never had.</p> <p>Any hint to the solution would be great!</p> <p>hosts entries:</p> <pre><code>192.168.19.101 mhvtest.loc #thats the domain (local vmware) entry 192.168.19.101 mhvdc1.mhvtest.loc #thats the domain controller entry 192.168.19.102 mhvex1.mhvtest.loc </code></pre> <p>Stacktrace is:</p> <pre><code> at System.DirectoryServices.AccountManagement.Utils.GetDcName(String computerName, String domainName, String siteName, Int32 flags) at System.DirectoryServices.AccountManagement.ADStoreCtx.LoadDomainInfo() at System.DirectoryServices.AccountManagement.ADStoreCtx.get_DnsDomainName() at System.DirectoryServices.AccountManagement.ADStoreCtx.GetAsPrincipal(Object storeObject, Object discriminant) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRefHelper(Type principalType, String urnScheme, String urnValue, DateTime referenceDate, Boolean useSidHistory) at System.DirectoryServices.AccountManagement.ADStoreCtx.FindPrincipalByIdentRef(Type principalType, String urnScheme, String urnValue, DateTime referenceDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate) at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue) at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, String identityValue) at Idda2.ActiveDirectory.UserPrincipalEx.FindByIdentity(PrincipalContext context, String identityValue) in D:\Users\vogt\Documents\src\idda2\trunk\Idda2.ActiveDirectory\UserPrincipalEx.cs:line 130 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload