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

Weird error with AppDomains

Hello,

I'm using AppDomains to launch another .NET application from within my
application.
The code looks like this:

<snip>
try
{
AppDomain app = AppDomain.CreateDomain( guestAppName );
app.ExecuteAssembly( dir + guestAppName );
}
catch ( Exception e )
{
System.Console.WriteLine( "There was a problem with the guest application:
" + e.ToString() );
}
</snip>

This works well with some guest application but with others, very similar
ones, I get the following error message:

<snip>
An unhandled exception of type 'System.ArgumentException' occurred in
mscorlib.dll
Additional information: Cannot pass a GCHandle across app domains.
</snip>

Besides from the code pasted above, there is no interaction between the
applications (parameters are passed by writing them to a database before
launching the guest application), so I have a hard time to track down the
source of the exception.

Also, this exception is not caught by the try / catch block around the
ExcuteAssembly statement.

I haven't found anything on the internet about that particular exception,
so maybe someone here can give me some hints on what might cause this
exception to occur.

I know that my code example isn't very specific, but posting the code of
the guest applications is not an option for various reasons (most of them
are practical :) ).
so, please help! I'm using .NET 1.1 and VS 2003 by the way...
tia,
melg,
dIdl

--
Dietmar
Hauser, Software Developer

dion-software, ViennaEurope; d.******@dion-software.com
tel.: +43 (0)1 512 60 35 -31
fax.: +43 (0)1 512 60 35 -12
hegelgasse 6/10, a-1010 vienna, http://www.dion-software.com
Nov 15 '05 #1
0 1658

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

Similar topics

1
by: Daylor | last post by:
hi. i have mult thread vb.net application. it has 30 threads. each thread serves 1 phone caller. the question : is there a reason , to create appdomain for each Phone Service ? meaning 30...
4
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...
2
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...
1
by: billr | last post by:
hi there, I hope that someone will be able to shed some light on little old confused me. We are developing an application which will be deployed onto a Terminal Server machine. The application...
8
by: Fred Mertz | last post by:
I'm working towards an MCTS cert and I'm having to learn a bunch of stuff that I doubt I'd stumble across on my own. One such feature of .NET is AppDomains; programatically creating new AppDomains...
0
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...
3
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...
0
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...
0
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 -...
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:
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
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
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
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,...
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...
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...

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.