views:

61

answers:

2

Simple question (comes up in SharePoint 2010, but that's not really relevant).

How does:

<add name="LdapMembershipProvider" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" 

...resolve when the actual type (LdapMembershipProvider) is only found in the Microsoft.Office.Server.UserProfiles assembly and not in the Microsoft.Office.Server assembly?

Both are GAC registered.

Does Fusion probe other assemblies, even when a fully qualified type is specified?

+1  A: 

Assembly binding redirection?

MSDN - Assembly Binding Redirection ?

You can redirect an assembly binding reference to another version of an assembly by using entries in the application or machine configuration files. You can redirect references to .NET Framework assemblies, third-party assemblies, or assemblies of your own application.

Ryan
Hi Ryan; I don't think it's related to binding redirection (used to redirect to different version of the assembly, not a different assembly all together).
Nariman
Hmm - I had assumed that you could do type as well as version. Downvoting my own answer! Time to crack out the Fusion log viewer I thinkhttp://msdn.microsoft.com/en-us/library/e74a18c4(VS.71).aspx+ Suzanne Cooke is the first blogger to go to for this elbows deep in the internals stuff.http://blogs.msdn.com/b/suzcook/
Ryan
A: 

Is it possible that the public key token is actually pointing to the correct assembly and its ignoring the assembly name?

I was reading the following MSDN reference:

http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.aspx

The excerpt that sounds suspicious:

It is possible to specify a public key and a KeyPair with inconsistent values. This can be useful in developer scenarios. In this case, the public key retrieved with GetPublicKey specifies the correct public key, while the KeyPair specifies the public and private keys used during development. When the runtime detects a mismatch between the KeyPair and the public key, it looks up in the registry the correct key that matches the public key.

Not sure. One behaviour that immediately springs to mind, but I cannot confirm is that if it fails to find the type in the assembly you specify in configuration, it tries to find it through your project references.

Adam