Security Exception in Finalizer of the RCW _EventProvider RRS feed

  • Question

  • Hi,

    we are running into problems shutting down our Partially trusted components which use COM objects with events via an RCW.

    Attempt by security transparent method 'RediLib.ECacheControl_EventProvider.Finalize()' to access security critical method 'System.Runtime.InteropServices.Marshal.ReleaseComObject(System.Object)' failed.

    We are in .Net 4.0, but the, but the RCW was generated using (SDK 6.0A) 3.5 version of tlbimp and is strongly named (fully signed). 

    Any suggestions?

    Friday, July 13, 2012 3:22 AM


  • It looks like in Finalizer, you are trying to release a COM object which is already released. So, check for that condition.

    I hope this helps.

    Please mark this post as answer if it solved your problem. Happy Programming!

    Friday, July 13, 2012 9:31 AM

All replies