473,387 Members | 1,585 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,387 software developers and data experts.

Adding a dll to an ASP.NET application

Hello,

I have an application that's a mix of classic ASP and ASP.NET running
on Windows server 2003.

I have a couple other dlls that are strongly named and are entered in
the GAC. For those I have entries in the web.config as well.

My problem file is not strongly named. It by default lives in a dll
folder. I tried copying it to the wwwroot\bin folder, but I'm still
getting errors when I try to instantiate it from within a .NET code
behind.

Locally we've added a reference to it in our localhost.sln file and it
works fine. When I add the reference it creates a copy of the dll and
a dll.refresh file that points to the original copy of the dll. I
can't figure out why it's working on my development machine and not in
my control environment. I also created a dll.refresh file that
contains the path of the original, but it's still not working.

Any idea what else is going on when I add a reference to the dll in
the VS.NET ide?

-Eric

Jun 18 '07 #1
3 15350
when you add a reference to a dll, vs copies it to the bin folder. when
you deploy, you need to include the bin folder, as this is the only
place asp.net looks beside the gac and the .net bin folder
-- bruce (sqlwork.com)

Eric wrote:
Hello,

I have an application that's a mix of classic ASP and ASP.NET running
on Windows server 2003.

I have a couple other dlls that are strongly named and are entered in
the GAC. For those I have entries in the web.config as well.

My problem file is not strongly named. It by default lives in a dll
folder. I tried copying it to the wwwroot\bin folder, but I'm still
getting errors when I try to instantiate it from within a .NET code
behind.

Locally we've added a reference to it in our localhost.sln file and it
works fine. When I add the reference it creates a copy of the dll and
a dll.refresh file that points to the original copy of the dll. I
can't figure out why it's working on my development machine and not in
my control environment. I also created a dll.refresh file that
contains the path of the original, but it's still not working.

Any idea what else is going on when I add a reference to the dll in
the VS.NET ide?

-Eric
Jun 19 '07 #2
On Jun 19, 11:08 am, bruce barker <nos...@nospam.comwrote:
when you add a reference to a dll, vs copies it to the bin folder. when
you deploy, you need to include the bin folder, as this is the only
place asp.net looks beside the gac and the .net bin folder

-- bruce (sqlwork.com)

Eric wrote:
Hello,
I have an application that's a mix of classic ASP and ASP.NET running
on Windows server 2003.
I have a couple other dlls that are strongly named and are entered in
the GAC. For those I have entries in the web.config as well.
My problem file is not strongly named. It by default lives in a dll
folder. I tried copying it to the wwwroot\bin folder, but I'm still
getting errors when I try to instantiate it from within a .NET code
behind.
Locally we've added a reference to it in our localhost.sln file and it
works fine. When I add the reference it creates a copy of the dll and
adll.refreshfile that points to the original copy of the dll. I
can't figure out why it's working on my development machine and not in
my control environment. I also created adll.refreshfile that
contains the path of the original, but it's still not working.
Any idea what else is going on when I add a reference to the dll in
the VS.NET ide?
-Eric
But I have the file and the .dll.refresh file in the bin directory and
it's not working...

-Eric

Jun 20 '07 #3
Hi,

Eric wrote:
>
But I have the file and the .dll.refresh file in the bin directory and
it's not working...

-Eric
Do the versions match? Make sure that the version of the DLL on your
development machine matches the version on the deployment machine. When
..NET tries to load a DLL, it looks in the bin folder and tries to find a
DLL with the same name and the same version. That might explain the error.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 20 '07 #4

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

Similar topics

7
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
1
by: Geraldine Hobley | last post by:
Hello, I'm having a problem adding a manifest to a vb project in order to add visual styles to my vb.net application. I followed the steps outlined her...
7
by: Adam Maltby | last post by:
Hi, I am adding an new picbox and animated gif to it at runtime Dim img As Image = Image.FromFile(Application.StartupPath & "\animation.gif") With pic_Wait .Location = New Point(300, 250)...
3
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three...
6
by: UJ | last post by:
I have a couple of files (type definitions, constants, ...) that I want to use in multiple projects. How do I make it so that I have only one copy of the file for multiple projects? If I do add...
4
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a...
7
by: moondaddy | last post by:
I'm running a wpf windows app and want to add the appSettings element to the config file. when I do, the app wont start up and I get the following error: {"The type initializer for...
1
by: vinodkreddy1 | last post by:
hi good morning every body... i have a problem in adding Reference of any dll to asp.net 2005. i am trying to add dlls reference to asp.net application. but they r not adding to the reference...
4
by: ifitzgerald | last post by:
Hi, I am modifying a rather large and complex MFC application (written by someone else) written in Visual C++ 6.0 with service pack 6. I need to add serial communication functionality to the...
8
by: Jason | last post by:
Hello, I am trying to utilitze the AJAX Control toolkit in my asp.net project. I have added a reference to AjaxControlToolkit.dll, and in my page, added these lines of code: ...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.