473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do I add a reference in webconfig?

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
Aug 28 '08 #1
4 2979
If you want to use one assembly for multiple applications, you should
register it into the GAC and reference it from there.
"Plasmodium" <pl**********@gmail.comwrote in message
news:d6**********************************@d1g2000h sg.googlegroups.com...
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

Aug 29 '08 #2
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)

Plasmodium wrote:
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
Aug 29 '08 #3
On Aug 29, 7:46 am, bruce barker <nos...@nospam.comwrote:
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)

Plasmodium wrote:
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
Thank you.
Aug 29 '08 #4
On Aug 28, 6:21 pm, "Scott M." <s-...@nospam.nospamwrote:
If you want to use one assembly for multiple applications, you should
register it into the GAC and reference it from there.

"Plasmodium" <plasmodiu...@gmail.comwrote in message

news:d6**********************************@d1g2000h sg.googlegroups.com...
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
Thank you
Aug 29 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vai2000 | last post by:
Hi All, I am calln WS via my aspx application. I am passing arguments an entire content of a file, sometimes the filesize i.e. the content size exceeds 4MB. In that case do I have to go and alter...
6
by: Buz Waitz | last post by:
I have prepared a site on one machine, but when I move the site to the machine I wish to use as a host, I have problems. If I use a default.htm file, I have no trouble accessing the site. However,...
1
by: Jenny | last post by:
Hi all I'm using forms authentication for my page. My webconfig (parts): <authentication mode="Forms" > <forms name="AuthCookie" path="\" loginUrl="Login.aspx"
1
by: brian | last post by:
I have a webconfig file in my root directory in IIS with session state set for 100 minutes. All login information is stored in session variables for the site. I have a page that is used by our...
5
by: Matt | last post by:
Hi all, I'm having a very strange problem. The third line in the following code gives me a null reference exception when used in an ASP.Net web page. The code is called on the click of a...
1
by: Vladimir Trpkovski via .NET 247 | last post by:
(Type your message here) Hello In order to use the web service from my application i need to adda web reference to that service. Can someone tell me how to dothat dynamically. For example: I get...
1
by: rapaka.srinivas | last post by:
Hi i am having a problem with dynamic webconfig.What i am doing exactly is i am calling a fucntion in app_start event that will fetch connection string from my system registry and updates my...
0
by: jambalapamba | last post by:
Hi I am trying to acess my webconfig file in aspx page .I know we can acess in code behind using ConfigurationManager.ConnectionStrings.ConnectionString; but i want to acess in aspx...
2
by: pavanip | last post by:
I placed my asp.net code in my server and i placed my database stuff in web hosting server.I created a virtual directory in web hosting server to access my files from my server.I have written the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.