473,670 Members | 2,397 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question regarding AppDomains.

I am creating an DLL dynamically. Sometime or another this DLL must be
recompiled and thus a new version must be uploaded.

I was told that to do this I have to load the assembly in a seperate domain.

The issue is that I do not know at design time what is in the dynamic DLL.
I need to create an instance of the class in that DLL, and get the methods
in that DLL (for which I know the names). Working with Activator class was
simple.... with AppDomains it is more complicated.

So what should I do? How can I load the instance and most important get
reference to a particular method in that instance.
Evan
Aug 1 '06 #1
1 988
Rick Strahl has a great article on code generation that includes examples of
how to host your objects in another appdomain.

http://www.west-wind.com/presentatio...ynamicCode.htm

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"Evan Camilleri" <e7***@yahoo.co .uk.nospamwrote in message
news:eV******** ******@TK2MSFTN GP03.phx.gbl...
>I am creating an DLL dynamically. Sometime or another this DLL must be
recompiled and thus a new version must be uploaded.

I was told that to do this I have to load the assembly in a seperate
domain.

The issue is that I do not know at design time what is in the dynamic DLL.
I need to create an instance of the class in that DLL, and get the methods
in that DLL (for which I know the names). Working with Activator class
was simple.... with AppDomains it is more complicated.

So what should I do? How can I load the instance and most important get
reference to a particular method in that instance.
Evan

Aug 1 '06 #2

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

Similar topics

4
2952
by: Mountain Bikn' Guy | last post by:
I need some advice on this. I am working on a fairly complex calculator app (C#) with lots of functions (and these functions in turn use math functions from an unmanaged C DLL). A calculation takes a lot of time (up to hours), and should run on a separate thread from the one that the GUI uses. The GUI also needs to display various properties for each function (such as parameters that can be set). It does this with property grid and other...
0
1762
by: Brian Takita | last post by:
Hello, I'm getting the following error at the end of this message when trying to run the ReportManager and the ReportServer: Assembly system.data.dll security permission grant set is incompatible between appdomains. I had to apply KB 887787 (http://support.microsoft.com/?kbid=887787) to fix my previous error, which stated... Assembly microsoft.web.validatepathmodule.dll security permission grant
2
1151
by: Jody L. Whitlock | last post by:
Okay, I've banged my head against a wall for over a year now. Maybe I'm just a rock when it comes to this. I've got a new project, a Windows Service. The "application" itself is in a DLL that is referenced by the exe. I did this for ease of updating, just copy my new DLL(s) into an update directory and restart the service when convienant. when the service EXE starts, it checks for anything in my update dir, copies them over to the...
8
1281
by: maneeshkhare | last post by:
I have a doubt regarding the architecture, and working of the ASP.NET framework. I haven't been able to satisfy myself with any answer. I do understand that for each request for a resource (let's talk page), we have 1 HttpApplication object from a pool that is managed by HttpApplicationFactory. My question is this. After all the objects that are created to service 1 request, is the same dll referenced for 1 page. Let's say 3 people...
6
4116
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including memory management and connection pooling constructs) as static variables which were intended to scoped to the process. 2. Managed C++ assemblies (.NET 1.1) that wrap the unmanaged DLLs as nice neat classes with managed interfaces.
0
1595
by: kayakyakr | last post by:
I'm working with a set of experiments in a large system that is using AppDomains for isolation and wants to make a call out to an umanaged dll. The test dll has two methods, SetNumber(int num) and GetNumber(), and a global variable. The DllImport and getting and setting the numbers are fine. The problem comes when I make the calls to the libraries from separate AppDomains. Calling SetNumber with 3 different values across 3 different...
3
3752
by: | last post by:
If this is simple, forgive my ignorance, but I'm coming from the CompactFramework where we don't use AppDomains. I did a fair bit of archive searching and couldn't find an answer and I got no responsed in the remoting group after a week, so I'm throwing a little wider net this time. I have a desktop app (FFx 2.0) developed with Studio 05 that loads assemblies in a separate AppDomains from the primary UI. I'd like to be able to hook up...
0
1860
by: jeremyje | last post by:
I would like to create an application where I have many concurrent processes being managed by a monitoring process. Each process that is "managed" will be invoked from an assembly dll (think reflection). I want a way to invoke these processes in parallel utilizing multi-core processors but I'd like to have the protection that AppDomains provide. I was doing some research where I found that there is no true isolation between threads and...
0
8703
by: PRR | last post by:
Here is a code i found on "how to enumerate appdomains in a current process". The original code was posted by Thomas Scheidegger Add the following as a COM reference - ~\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscoree.tlb using mscoree; using System.Runtime.InteropServices;
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8814
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2800
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2042
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.