How to reference a DLL in web.config?

I have a DLL in the BIN folder, and I need it to be referenced in the web.config file, or I get this nasty error:

Description: An error occurred while compiling the requested resource to service this request. Please read the following specific error information and modify the source code accordingly.

Compiler Error Message: CS0234: The type or namespace name 'ServiceModel' does not exist in the Microsoft namespace (do you miss the assembly?)

This dll is not in the GAC, and for this I cannot use

<assemblies><add ...

So, I assume that I need to use configSections, for example

<configSections>
  <section name="Microsoft.System.Web" 
           type="Microsoft.System.Web,
                 Version=3.0.0.0, Culture=neutral,
                 PublicKeyToken=10633fbfa3fade6e "/>
</configSections>

What should be the correct code?

+5
2

, bin - , .

configSection . web.config. , , exampleSection, configsSections. "exampleSection" web.config.

, configSections , , , . - ( , ), - , . configSection , , , .

, , , . ?

+2

, , dll bin, , .SLN web.config.

0

All Articles