Article ID: 938303 - View products that this article applies to.
You use the AttachEvent method in a Microsoft ASP.NET application. You try to use this method to embed a Microsoft Office Web Components spreadsheet control in Microsoft Internet Explorer 6. When you do this, Internet Explorer stops responding. When you try to close Internet Explorer or when you click a button in the application, Internet Explorer stops unexpectedly. Additionally, you receive the following error message:
When you click Continue to close the error message, you receive the following error message:
Internet Explorer has encountered a problem with an add-on and needs to close.
The following add-on was running when the problem occurred:
Company Name: Microsoft Corporation
Description: Microsoft Office Web Components 2003
Learn more about add-ons.
Note This problem does not occur when you use Windows Internet Explorer 7.
Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience.
If you were in the middle of something, the information you where working on might be lost.
Please tell Microsoft about this problem!
We have created an error report that you can send to help us to improve
Internet Explorer. We will treat this report as confidential and anonymous.
To see what data this report contains click here.
This problem occurs because of behavior that occurs when you use the AttachEvent method. When you do this, the interface pointer that is referenced by the spreadsheet control may be released before the control is completely shut down. When this problem occurs, Internet Explorer cannot release the pointer after the pointer has already been released. For example, this problem occurs when you use code that resembles the following example.
To resolve this problem, use attributes instead of events in the code for the application. Then, try running the application again. For example, use code that resembles the following code example.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.