473,408 Members | 2,477 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,408 software developers and data experts.

Problems with App Domains

Hi! Sorry for my English. :)

Please consider the following code:

----------------------------------------------------------------------------
-
System.AppDomainSetup ap_setup = new System.AppDomainSetup();
ap_setup.LoaderOptimization = System.LoaderOptimization.MultiDomain;
AppDomain ap = AppDomain.CreateDomain("DomainForWork", null, ap_setup);
System.Security.Policy.Evidence pe = new System.Security.Policy.Evidence();
pe.AddAssembly(ap);
System.Reflection.Assembly a = ap.Load("Classes", pe);
System.Type t = a.GetType( "Global" );
System.Reflection.MethodInfo mi = t.GetMethod("InitColl");
mi.Invoke(null, null);
System.AppDomainSetup ap_setup2 = new System.AppDomainSetup();
ap_setup2.LoaderOptimization = System.LoaderOptimization.MultiDomain;
AppDomain ap2 = AppDomain.CreateDomain("DomainForWork2", null, ap_setup2);
System.Security.Policy.Evidence pe2 = new System.Security.Policy.Evidence();
pe2.AddAssembly(ap2);
System.Reflection.Assembly a2 = ap2.Load("Classes", pe2);
System.Type t2 = a2.GetType( "Global" );
System.Reflection.MethodInfo mi2 = t2.GetMethod("InitColl");
mi2.Invoke(null, null);
----------------------------------------------------------------------------
-

We have dll named "Classes" and we load it in two different application
domains. Then we successfully call static method named "InitColl" in the
first domain, but if we call this method in second domain after calling it
in the first domain, we have an exception. Why call of this method in the
second domain is able to see changes that was made by it in first domain?
Does anyone know what's the problem?
Jul 21 '05 #1
0 996

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

Similar topics

8
by: Marc Hoeve | last post by:
Hi everybody I'm setting up 2 websites for a friend of mine, en I'm have problems with one of the sites. The situation: I have 2 different domains (both in the .NL domain). Both domains...
6
by: Jeff Thies | last post by:
I have some pages where I need to use a base href tag. Mac behaviour is different than PC. I have this: <base href="http://some_domain.com" /> The page would be:...
9
by: tshad | last post by:
This is a problem that we saw before on our asp site, but don't know how to fix it. We are seeing it on our .net site also. We have our email sending from our Windows 2003 server with exchange...
1
by: Paul Fi | last post by:
I have some confusions about the two, is it possible to create threads inside a particular domain and have other threads created in another domain or do we create threads that will manipulate app...
5
by: moondaddy | last post by:
I'm setup with a new ISP where we were given an account which we could setup multiple domains. To do this we were given a root directory where we setup a folder for each domain. then we mapped...
6
by: Ludvig | last post by:
I have various domains using the same application/assembly They differ in contents and design, based on a "site id", and get its information from an SQL server. Now I have to deploy the...
7
by: Doug | last post by:
An ASP.NET session cookie set on "www.mydomain.com" can not be accessed on "search.mydomain.com"; hence, a new session and cookie are being created on every sub-domain. This is occuring because...
2
by: starfi3ld | last post by:
I got a few errors with this script Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/starfi3ld/domains/starfi3ld.com/public_html/newreleases.php on line...
3
by: alexdavies82 | last post by:
I am having a problem producing a relatively simple PHP code. Whenever I run it it gives the following fault message:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
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...
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
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...

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.