PRB: ActiveX Error When You Sink Managed Events in Internet Explorer Script (814664)
The information in this article applies to:
- Microsoft .NET Framework 1.0
- Microsoft Internet Explorer (Programming) 5.5
- Microsoft Internet Explorer (Programming) 6.0
- Microsoft .NET Framework 1.1
SYMPTOMSWhen you sink managed events in Internet Explorer script,
you may receive the following warning message: An ActiveX
control on this page is not safe. Your current security settings prohibit
running unsafe controls on this page. As a result this page may not display as
intended WORKAROUNDTo work around this problem, create a dummy interface and
then implement the newly created interface in a MyWindowControl class that exists already. Make the following modifications to
the code:
...
public interface MyDummyInterface
{
}
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None),System.Runtime.InteropServices.ComSourceInterfaces(typeof(ControlEvents))]
public class MyWindowControl : System.Windows.Forms.UserControl,MyDummyInterface
{
...
}
STATUS Microsoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
REFERENCES
For additional information, click the following article numbers to view the
articles in the Microsoft Knowledge Base: 313891
HOW TO: Sink Managed C# Events in Internet Explorer Script
316510 BUG: Security Exception When You Use Event Handlers in Internet Explorer
For more information, visit the following
Microsoft Developer Network Web sites:
Modification Type: | Major | Last Reviewed: | 6/5/2003 |
---|
Keywords: | kbCOMInterop kbprb KB814664 kbAudITPRO |
---|
|