How do I add a reference in webconfig?

  • Thread starter Thread starter Plasmodium
  • Start date Start date
P

Plasmodium

We have an ASP.NET app. This app has objects defined in some dlls
that the main app on the system uses. If we copy the dlls to the bin
directory that the asp app runs out of, it works fine.
We want to use only one set of dlls for both apps, but so far have
been unable to do so. In the webconfig file, I've tried adding a
reference in the assemblies section like this:
....
<<<
<add assembly="d:\Bin\MyRefDll.dll, Version=1.0.3162.27938,
Culture=neutral, PublicKeyToken=56aa9f4561fda77e"/>.....
The error is always this:
The given assembly name or codebase was invalid. (Exception from
HRESULT: 0x80131047).

Any help appreciated,
Ed
 
If you want to use one assembly for multiple applications, you should
register it into the GAC and reference it from there.
 
you can only specify the name, not path in web.config. to share a dll
between asp.net sites, you either place in it in the gac (not the best
idea), or put a copy in the bin folder (this is what visual studio does
when you add a reference).

-- bruce (sqlwork.com)
 
you can only specify the name, not path in web.config. to share a dll
between asp.net sites, you either place in it in the gac (not the best
idea), or put a copy in the bin folder (this is what visual studio does
when you add a reference).

-- bruce (sqlwork.com)

Thank you.
 
Back
Top