473,472 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

App domains

Manoman, what a headache,

I am trying to run some code in a separate Application Domain (in C#)

I need to load an assembly (.DLL) and run it in a separate memory area
(Appdomain) as I have a service that calls some rather unreliable code. If
this code fails, I want it cleaned up as extensively as possible but the
service must still attempt again at the next polling interval.

I can get simple samples to work in a rather convoluted manner, more complex
samples where the called class inherits from a base class etc just dont want
to play along and give Invalid Cast Exceptions.

Does anyone that has burnt on this before have some C# code for me that.

1) Creates an AppDomain
2) Loads an Assembly (.NET) DLL
3) Runs a method in that assembly
4) Shuts down / Unloads the application domain.

Thanks in advance

Nov 16 '05 #1
1 1073
Hi,

I've used AppDomains quite extensively, but I don't remember any problems
with inherited classes. You should of course ensure the assembly containing
the type which is either passed across domains or a type participating in
cross-domain calls is loadable from both of the domains.

"Murray Foxcroft" <murray(UseADot)fo******@ast.co.za> wrote in message
news:Oc*************@TK2MSFTNGP12.phx.gbl...
Manoman, what a headache,

I am trying to run some code in a separate Application Domain (in C#)

I need to load an assembly (.DLL) and run it in a separate memory area
(Appdomain) as I have a service that calls some rather unreliable code. If
this code fails, I want it cleaned up as extensively as possible but the
service must still attempt again at the next polling interval.

I can get simple samples to work in a rather convoluted manner, more complex samples where the called class inherits from a base class etc just dont want to play along and give Invalid Cast Exceptions.

Does anyone that has burnt on this before have some C# code for me that.

1) Creates an AppDomain
2) Loads an Assembly (.NET) DLL
3) Runs a method in that assembly
4) Shuts down / Unloads the application domain.

Thanks in advance


Nov 16 '05 #2

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

Similar topics

1
by: d.schulz81 | last post by:
Hi all, We have about 10 different domains that are linked very closely and we want to identify and keep track of every single user that surfs our websites by the use of sessions. The problem...
7
by: | last post by:
I think I may have a problem with the user of cookies in my centralized logon and registration system that I hoped could be consumed by all the sub-domains on my remote host IP. I built the...
1
by: Silver Arrow | last post by:
Iframe ReturnValue returns undefined if domains are not the same I am using a modal window and an iFrame to try and pull a return value back. IMPORTANT : I am doing this across domains. Main...
6
by: onetitfemme | last post by:
Domain are very cheap now adays. What would be the pros and cons of using different hosts served from the same server, say: www.blogyourbrainoff.com and www.yourbusiness.com
1
by: barbaraJacob | last post by:
Hi everyone! Must deliver my project tomorrow....It's nearly finished. I've set up a website to be published in 3 different domains. - same webserver (I mean physically the same machine) -...
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...
3
by: Marc Eggenberger | last post by:
Hi there. I have the following environment: Active Directory running on Windows 2000. There is a root domain called ad.sys and within this root domain there are the following subdomains: ...
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
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...
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
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...
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.