Marshal.ReleaseComObject used with intrinsic IIS / ASP objects?

Discussion in 'ASP .Net' started by jason, Jan 10, 2006.

  1. jason

    jason Guest

    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
     
    jason, Jan 10, 2006
    #1
    1. Advertising

  2. jason

    Bruce Barker Guest

    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)


    "jason" <> wrote in message
    news:...
    > 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
    >
     
    Bruce Barker, Jan 10, 2006
    #2
    1. Advertising

  3. jason

    jason Guest

    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?
     
    jason, Jan 10, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alek Davis
    Replies:
    15
    Views:
    7,237
    Scott M.
    Nov 12, 2009
  2. Alan Ho

    Intrinsic objects of ASP.Net

    Alan Ho, May 9, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    2,447
    Juan T. Llibre
    May 9, 2005
  3. Replies:
    10
    Views:
    541
    Aaron Watters
    Jun 18, 2008
  4. Fahad Ashfaque
    Replies:
    3
    Views:
    205
    Egbert Nierop \(MVP for IIS\)
    Jul 27, 2004
  5. Michael Davis

    Ruby 1.8 and Marshal.load/Marshal.dump

    Michael Davis, Oct 10, 2003, in forum: Ruby
    Replies:
    0
    Views:
    176
    Michael Davis
    Oct 10, 2003
Loading...

Share This Page