This project is read-only.

Querying User DNs (Fishy Behavior)

Jan 16, 2012 at 2:53 AM

I have bad mojo happening with LINQ to LDAP. I hesitate to call this a bug on LINQ to LDAP's part because I cannot produce it effectively but have narrowed it down considerably. Could still be user error but I feel iffy about that too as I will explain in a moment.

I wrote a small project using LINQ to LDAP to populate LDAP with users and groups. The users are pulled from the Northwind db Employees table and are placed in two groups: Employees (all employees) and Managers (only the employees found in the table that are reported to by other employees). This project works.

Next, I created a separate project (in a separate solution) where I was trying to practice some design patterns. This project was making progress until this morning when what I thought I had working earlier broke. I debugged, traced steps, confirmed that first project was still working, and eventually just added a new project to this solution and duplicated the small project so I could debug and tweak it in comparison to my current project to see where I was going wrong. The duplicated project wouldn't even work despite it being the same as my working small project.

Then I created another new project, in a new solution, and duplicated the small project again. It worked.

I've doubled checked settings, compared diff files, tried another go duplicating the working example in the solution in question. The behavior is isolated to a single project solution, which I have never seen before.  Was wondering if anyone had run into this, with LINQ to LDAP or in general?

Issue Details:

This code snippet results in a "No Source Available" page in VS 2010.


string[] employeeDNs = ldapContext.Query<Employee>().Select(ldapEntry => ldapEntry).ToArray().Select(e => e.DistinguishedName).ToArray();


Call Stack Location:
LinqToLdap.dll!LinqToLdap.QueryCommands.StandardQueryCommand.HandleStandardRequest(System.DirectoryServices.Protocols.DirectoryConnection connection, System.IO.TextWriter log) Line 63

Source File Information:
Locating source for 'C:\Users\ahatter\Documents\Visual Studio 2010\Projects\linqtoldap\Trunk\LinqToLdap\QueryCommands\StandardQueryCommand.cs'. Checksum: MD5 {82 29 c 97 e5 ff 75 a0 d1 85 c6 6 a6 56 ee aa}
The file 'C:\Users\ahatter\Documents\Visual Studio 2010\Projects\linqtoldap\Trunk\LinqToLdap\QueryCommands\StandardQueryCommand.cs' does not exist.Looking in script documents for 'C:\Users\ahatter\Documents\Visual Studio 2010\Projects\linqtoldap\Trunk\LinqToLdap\QueryCommands\StandardQueryCommand.cs'...
Looking in the projects for 'C:\Users\ahatter\Documents\Visual Studio 2010\Projects\linqtoldap\Trunk\LinqToLdap\QueryCommands\StandardQueryCommand.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Users\ahatter\Documents\Visual Studio 2010\Projects\linqtoldap\Trunk\LinqToLdap\QueryCommands\StandardQueryCommand.cs.
The debugger could not locate the source file 'C:\Users\ahatter\Documents\Visual Studio 2010\Projects\linqtoldap\Trunk\LinqToLdap\QueryCommands\StandardQueryCommand.cs'.

Thank mon!


Jan 16, 2012 at 6:32 AM

Try this:

Jan 17, 2012 at 2:31 AM

Thanks but no soap, dude. I just copied my code over into a new project solution and was able to carry on. Must have been a result of some goofy mixture of VS and me!

Thanks again for taking a look!  You ain't 'fraid of no ghost!