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

Attempted to access an unloaded AppDomain

I've been plagued with an "Attempted to access an unloaded AppDomain" for
several months now. We have a .NET Email Component such that for some
ASP.NET customers that user our DLL will get this error occasionally. Our
DLL is strongly named, so I am confused as to how this could be happening.
It is a mixed-mode DLL implemented in managed C++ such that a thin managed
C++ wrapper surrounds the unmanaged C++ implementation. I've gone over every
piece of documentation and information on the Net that I can find about
creating managed wrappers around unmanaged types, and as far as I can see I
am doing everything correctly. To give you a flavor of what happens, here is
an example snippet of a customer's code:

Chilkat.Email email = new Chilkat.Email();
email.From = FromAddress;
email.AddTo("", Address);
email.Subject = Subject;
email.Body = Body;
The exception occurs when I set a value to the Body. The other statements
execute without issue. Also, when I dump "email" in the Command Window, I
get this:
{Chilkat.Email}
System.Object: {Chilkat.Email}
Body: <error: an exception of type: {System.AppDomainUnloadedException}
occurred>
Decrypted: false
EmailDate: {7/9/2003}
EncryptedBy: ""
FileDistList: ""
From: ""
FromAddress: ""
FromName: ""
HtmlCharset: "us-ascii"
LastError: ""
LocalDate: {7/9/2003}
m_email: 84812680
Mailer: "Chilkat Software Inc (http://www.chilkatsoft.com)"
NumAlternatives: 0
NumAttachedMessages: 0
NumAttachments: 0
NumBcc: 0
NumCC: 0
NumRelatedItems: 0
NumReplacePatterns: 0
NumTo: 0
OutlookDistList: ""
PlainTextCharset: "us-ascii"
RawHeader: "MIME-Version: 1.0\r\nDate: Wed, 09 Jul 2003
10:55:07 -0400\r\nMessage-ID:
<CHILKAT-MID-b18bc301-2589-4599-be87-d83d647ca053@blah>\r\nContent-Type:
text/plain; charset=\"us-ascii\"\r\nContent-Transfer-Encoding:
7bit\r\nX-Mailer: Chilkat Software Inc
(http://www.chilkatsoft.com)\r\nX-Priority: 3 (Normal)"
ReceivedEncrypted: false
ReceivedSigned: false
ReplyTo: ""
ReturnReceipt: false
SendEncrypted: false
SendSigned: false
SignaturesValid: false
SignedBy: ""
Size: <error: an exception of type: {System.AppDomainUnloadedException}
occurred>
Subject: ""
Uidl: ""
Note that Size and Body both return exceptions. Can you think of anything
that could possibly cause this? Any help would be much appreciated.

Best Regards,
Matt Fausey
Chilkat Software, Inc.
Nov 16 '05 #1
1 23769
Hi Matt,
I've been plagued with an "Attempted to access an unloaded AppDomain" for
several months now. We have a .NET Email Component such that for some
ASP.NET customers that user our DLL will get this error occasionally. Our
DLL is strongly named, so I am confused as to how this could be happening.
It is a mixed-mode DLL implemented in managed C++ such that a thin managed
C++ wrapper surrounds the unmanaged C++ implementation. I've gone over every piece of documentation and information on the Net that I can find about
creating managed wrappers around unmanaged types, and as far as I can see I am doing everything correctly. To give you a flavor of what happens, here is an example snippet of a customer's code:

Seems like you're running into
http://support.microsoft.com/default...;en-us;Q309694

--
Tomas Restrepo
to****@mvps.org
Nov 16 '05 #2

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

Similar topics

0
by: Derek Young | last post by:
I have a unit test I've written that tests a lot of managed C++/unmanaged C++/C# interactions. I'm running it under NUnit which creates a separate AppDomain for the test, runs it, then unloads the...
4
by: stu_pb | last post by:
I am designing a plugin system for a window application using .NET(C# specifically). One of the requirements of the plugin system is to be able to dynamically load/unload plugins. My initial...
0
by: Brad | last post by:
I am not exactly sure where to post this query, so I hope this reaches the appropriate audience. I am attempting to launch a program on its own thread inside of an asp.net page which will block...
1
by: BuddyWork | last post by:
I think I've found a possible issue with .Net AppDomain.Unload when using attribute LoaderOptimization.MultiDomain. Here you will need ProcessExplorer from SysInternals to see what assemblies...
2
by: cameron | last post by:
I have a page that needs to process aproximately 7000 LDAP entries and does 10-12 SQL DB calls per entry. It is a busy, busy page. I have it schedualed to run every night at 4 am server time. It...
1
by: Charles Herring | last post by:
In my asp.net application I upload a video file and then need to get the duration and other properties. I get "Attempted to access an unloaded AppDomain" when I instanciate the Video object. I am...
5
by: jake | last post by:
I've seen many articles that claim the files in the App_Code directory are treated in the same way as aspx-files in ASP 1.1. Well, this does not seem to be the case, at least in Web Developer 2005...
1
by: Basti | last post by:
Hello, I'm working with .Net 2.0. I tried to get attributes of an unloaded assembly. So, the sole way I know is to create a new child application domain, in this app domain I load the assembly,...
0
by: Zeya | last post by:
Situation: Using C#, ASP.Net Requirement: 1. ASP.net application with virtual hosting service. 2. Requires a service that will run every predefined frequency in minutes (2, 30, 100, 10000)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.