views:

61

answers:

1

Here is my code that tries to get a custom configuration object from web.config:

LdapConfiguration ldapConfig = (LdapConfiguration)ConfigurationManager.GetSection("ldapConfiguration");

When that line of code is ran I get this error page.

Here is screenshot showing that I have included the reference to the project that contains the configuration object:

I do see the GTCCLdap.dll file in my bin file after I build the project.

+1  A: 

You say that the assembly is called GTCCLdap.dll but your config is looking for GTCC.Ldap.dll.

Unless that was a typo in your question, change your config to this:

<section name="ldapConfiguration" type="GTCC.Ldap.LdapConfiguration,GTCCLdap"/>
Andrew Hare