How do I add a reference in webconfig?

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
 
S

Scott M.

If you want to use one assembly for multiple applications, you should
register it into the GAC and reference it from there.
 
B

bruce barker

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)
 
P

Plasmodium

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,252
Latest member
MeredithPl

Latest Threads

Top