Ronnie Overby
Ronnie Overby

Reputation: 46480

asp.net Problem with assembly reference

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.

Upvotes: 0

Views: 175

Answers (1)

Andrew Hare
Andrew Hare

Reputation: 351638

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"/>

Upvotes: 1

Related Questions