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

AppDomainUnloaded Exception (Q309684) occurring without any unmanaged code involved

Hey everyone,

I have an issue that requires an urgent solution. I had a look at the
Technote above, and it states that the AppDomainUnloaded Exception
occurs with ASP.NET when using Managed C++ extensions as a wrapper to
Unmanaged C++ calls.

I am, however, seeing a similar problem with ASP.NET and my remoting
Managed VC++ .NET components. However, my remoted VC++ .NET
components do not call any Unmanaged code whatsoever.

My project consists of a singleton C++ .NET remoted object that is
first instantiated by a Windows Service (also created in VC++.NET).
This singleton provides access to other remoted objects that form a
business objects layer. ASP.NET then uses remoting to access the
singleton and any subsequent objects. Now, Everything works fine for
awhile, but randomly, I keep getting the AppDomainUnloadedException
whenever the ASP.NET pages try to access some of the remoted objects.
Now, I did add the following to each type of remoted .NET Components
to make sure that it has an infinite lifetime:

Object *InitializeLifetimeService()
{
return 0;
}

but the problem still seems to occur. My business objects exposed by
the singleton use ADO.NET to access an MSDE Database. The annoying
part is that the objects can be up for 5 minutes or an hour, the
occurrance of the Exception is totally random. The workaround
presented in the KBASE article is not a solution, as we have multiple
ASP.NET Web Apps hosted on this server.

Any help would be greatly appreciated, and my thanks in advance!
Nov 17 '05 #1
1 1258
oh, and just to mention, I am using VS.NET 2003 with the latest framework

ha************@creo.com (Hamad Deshmukh) wrote in message news:<91*************************@posting.google.c om>...
Hey everyone,

I have an issue that requires an urgent solution. I had a look at the
Technote above, and it states that the AppDomainUnloaded Exception
occurs with ASP.NET when using Managed C++ extensions as a wrapper to
Unmanaged C++ calls.

I am, however, seeing a similar problem with ASP.NET and my remoting
Managed VC++ .NET components. However, my remoted VC++ .NET
components do not call any Unmanaged code whatsoever.

My project consists of a singleton C++ .NET remoted object that is
first instantiated by a Windows Service (also created in VC++.NET).
This singleton provides access to other remoted objects that form a
business objects layer. ASP.NET then uses remoting to access the
singleton and any subsequent objects. Now, Everything works fine for
awhile, but randomly, I keep getting the AppDomainUnloadedException
whenever the ASP.NET pages try to access some of the remoted objects.
Now, I did add the following to each type of remoted .NET Components
to make sure that it has an infinite lifetime:

Object *InitializeLifetimeService()
{
return 0;
}

but the problem still seems to occur. My business objects exposed by
the singleton use ADO.NET to access an MSDE Database. The annoying
part is that the objects can be up for 5 minutes or an hour, the
occurrance of the Exception is totally random. The workaround
presented in the KBASE article is not a solution, as we have multiple
ASP.NET Web Apps hosted on this server.

Any help would be greatly appreciated, and my thanks in advance!

Nov 17 '05 #2

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

Similar topics

3
by: Monster | last post by:
Are they expensive because of what happens when an exception is thrown or because of the extra checking involved when you wrap exceptions around code?
2
by: Bret Pehrson | last post by:
Suppose the following: // Unmanaged code class UnmanagedException /* not visible outside of unmanaged code */ { }; void DoSomething() /* visible (exported) to managed code */ { throw new...
0
by: Joe | last post by:
Reposting here as there were no useful replies in the dotnet.framework NG... What is the correct pattern for handling exceptions in IDisposable.Dispose, especially in a class that manages...
0
by: | last post by:
Hi, Does anyone know whether this bug related to AppDomainUnloaded exception and managed c++ has been fixed in VS.NET 2003 and framework 1.1? ...
5
by: Peter Steele | last post by:
We have an application that when it runs in the IDE in debug mode an unhandled exception is occurring in a system header file associated with STL stirngs. The actual statement that crashes is ...
1
by: Bruce | last post by:
I am using VC .NET 2003. I created a simple unmanaged class in C++. The class is contained in a library. I then created a simple managed class wrapper that calls a function in the unmanaged...
14
by: Mohamed Mansour | last post by:
Hey there, this will be somewhat a long post, but any response is appreciated! I have done many PInvoke in the past from C++ to C#, but I did PInvoke within C# not C++/CLI. Can someone explain...
1
by: tk121 | last post by:
Hey all - I have some unmanaged code that I'm calling into with C# .NET 2.0, and everything works flawlessly in the debugger, but as soon as I run the application as a standalone executable it...
4
by: =?Utf-8?B?dmlwZXJ4MTk2Nw==?= | last post by:
We are having an issue with an application we are developing. We have a Legacy COM DLL in C++ that we have converted to Visual Studio 2008. This COM DLL has methods that are calling Managed C#...
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...
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
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
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,...

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.