views:

882

answers:

1

I have written a C# ActiveX control that is loaded in a web page hosted by IE7. The page uses Javascript to interact with the ActiveX control (calling functions and receiving events).

On the page, there is also a Flash object.

Occasionally IE will hang, with an Access Violation error in the Application Log - is it plausible that the C# ActiveX control causes this? There is nothing obviously going wrong, no exceptions etc. The control connects to a WCF service (again, to call functions and receive events) - could this be a problematic area? Again, all proxies/channels are cleaned up nicely, no obvious errors. The control really only acts as a communication helper between the Javascript and the WCF service - i.e. it doesn't process much data itself, simply passes messages around. There are no array/memory operations going on that could obviously cause buffer overflows etc.

One aspect I would like to clean up is disposing of the WCF proxies/channels when the web page is unloaded - the control implements IDisposable, but I don't believe it is possible to reliably call Dispose from the Javascript - is there a COM interface that could be implemented that IE itself would call on removing the object?

A: 

I'm sorry this is not an answer but a question, as it seems that you've gone further than many other people. Are you experiencing any problem with COM event handling in IE7? Can you show a sample of how to handle such an event? I need to create a similar solution in silverlight. I've created a COM using ATL to debug the event firing and the connection points collection is always empty... so it seems that IE it not providing the event sink to the component...