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

Dynamic creation of object problem

Hi all...

During startup of an ASP.NET app, I have code that dynamically goes out and
loads assemblies, looking for objects that implement a particular interface.
This code works fine, EXCEPT, the objects do not get unloaded out of the
ASPNET_WP process when I end the application during debugging, and come back
to Visual Studio. I have to manually kill the ASPNET_WP process in order to
re-build the dlls, as they are locked - something that normally shouldn't
happen, but is.

Any ideas? I've thought about loading the objects into another AppDomain,
but it seems like a lot of extra work everytime I want to load objects
dynamically under ASPNET.

Nov 18 '05 #1
1 1071
Hi Harry:

ASP.NET makes a shadow copy of the assemblies it loads, that way
assemblies in the bin directory are never locked by the worker
process.

Using Assembly.Load to dynamically load an assembly does lock the
assembly. There is no way to unload an assembly from an app domain.
Unfortunately, using another application domain might be your only
option if you want to avoid cycling the worker process

--
Scott
http://www.OdeToCode.com

On Tue, 10 Aug 2004 10:47:36 -0700, "Harry F. Harrison"
<Ha************@sbcss.k12.ca.us> wrote:
Hi all...

During startup of an ASP.NET app, I have code that dynamically goes out and
loads assemblies, looking for objects that implement a particular interface.
This code works fine, EXCEPT, the objects do not get unloaded out of the
ASPNET_WP process when I end the application during debugging, and come back
to Visual Studio. I have to manually kill the ASPNET_WP process in order to
re-build the dlls, as they are locked - something that normally shouldn't
happen, but is.

Any ideas? I've thought about loading the objects into another AppDomain,
but it seems like a lot of extra work everytime I want to load objects
dynamically under ASPNET.


Nov 18 '05 #2

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

Similar topics

1
by: andrew queisser | last post by:
I've been trying to dynamically create a class DevT that's derived from a generic base GenBase<T>. It doesn't seem to work. I'm attaching a code sample below that illustrates the problem. ...
2
by: Assaf | last post by:
Hi all, My web form creates & displays dynamic controls when a user clicks a button (code below). No problem. But how do I persist a new control? Every postback destroys the object never to be...
1
by: russ | last post by:
Hi all, Here's a problem I'm having with a dynamic table. Following the guidelines here (http://www.codeproject.com/aspnet/dynamiccontrols.asp), which make perfect sense. The problem is that...
3
by: vodafone | last post by:
Hy all I've a little problem. I need to write a dynamic page that render control according to validation status return from previous control validation status. To be clear, I've page that...
15
by: rwf_20 | last post by:
I just wanted to throw this up here in case anyone smarter than me has a suggestion/workaround: Problem: I have a classic producer/consumer system which accepts 'commands' from a socket and...
0
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab,...
13
by: xian_hong2046 | last post by:
Hello, I think dynamic memory allocation is supposed to be used when one doesn't know in advance how much memory to allocate until run time. An example from Thinking in C++ is to dynamically...
13
by: DaTurk | last post by:
Hi, This is a question brought about by a solution I came up with to another question I had, which was "Dynamic object creation". So, I'm curious if you can dynamically cast an object. If you...
1
by: cdmsenthil | last post by:
I have an Infragistics UltrawebGrid . Each Row in the grid is attached to a context menu using Infragistics CSOM Upon click on the menu, I am creating an Iframe dynamically which points to...
6
by: shashi shekhar singh | last post by:
Respected Sir, I have to create multiple dynamic dropdownlist boxes and add items dynamically in <asp:table> server control but problem occurs , i.e. except of fist dropdown list no dropdownlist...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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: 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...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.