Marshal.ReleaseComObject used with intrinsic IIS / ASP objects?

J

jason

hello everyone,

i have had a suppot ticket open with microsoft for some time to
investigate a memory leak issue we are experiencing on our production
web servers. the web servers host both ASP classic and ASP.NET
applications, and the leak is caused, at least in part, by the ASP.NET
appliactions according to our support engineer. this is what he says:

[begin quote]
After a bit of research I was able to determine more on this stack. The
problem here is we are trying to release a reference on an object who's
DLL is already unloaded from the process. Therefore, we cannot find a
direct coorelation to what it is we are trying to free. Based on other
cases where this was observed, the most likely cause here is the use of
the IIS / ASP intrinsic objects in ASP.Net code, without a call to
Marshal.ReleaseComObject in the associated .Net assembly. In order to
resolve this crash, please have your developers review thier .Net
assemblies that may use the IIS / ASP intrinsic objects and make sure
these assemblies make explicit calls to Marshal.ReleaseComObject. This
should resolve the crash that we have seen here, which has not been the
focus of our case thus far. Do you wish to continue attempts to resolve
the memory leak observed previously and if so, do we have an ETA on
when that data may be available?
[end quote]

my question is, which iis / asp intrinsic objects might be candidates
for this? the only intrinsics i can think of that are in use are the
Session and Application objects, but i assumed that those were cleaned
up by the OnEnd events themselves. does anyone know of some other
common objects that require this marshalling release?

thanks,

jason
 
B

Bruce Barker

if you use any com objects (or interop to one), you need to call
Marshal.ReleaseComObject or you will have unmanged memory leaks. this is
becuase the objref will not be released until the GC releases the interop.

-- bruce (sqlwork.com)
 
J

jason

here's a question then.

if i have ASP.NET code, and it's using a .NET class library that was
coded for COM interop so that it could work with another ASP classic
application as well, is that considered a interop'd library? or can an
interop compiled library still be used as .NET by ASP.NET applications?
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top