AppDomainUnloaded Exception (Q309684) occurring without any unmanaged code involved

H

Hamad Deshmukh

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!
 
H

Hamad Deshmukh

oh, and just to mention, I am using VS.NET 2003 with the latest framework
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top