NOTE: What we have done here is both create a strong-named assembly and told an application where to
load a particular assembly from . In ASP.NET you normally don't need to add a refernce to an assembly in
web.config as most of the assemblies used are either loaded from the GAC or the Virtual
Directory's
\bin directory. However, when you want to load an assembly remotely you need to
a an explicit reference to that directory or add it the assembly to the
GAC so that the
metadata of that assembly can be readily available to the CLR upon compilation of the
Window Form or ASP.NET applcation.
You can copy the assembly to the ASP.NET application's
\bin directory or the
GAC but then
you would consistently have to update both the remote assembly and the local assembly (causing DLL hell!).
In ASP.NET, I add a reference to the
web.config file that points to a strong-name assembly in
GAC on that ASP.NET (IIS) computer like this:
In Visual Studio .NET I add a reference to an assembly using a UNC path such as
\\MyServer\MyShare\MyAssemblies\MyAssembly.dll. This way, I consistently have a common place where
to store assemblies that many of my .NET applications can reference.