Jan 2, 2008

Component cannot be created and AspCompact need to be TRUE

Usually in a vb6 to ASP.NET migration process, you will get this error.
Error: The component 'myCOM.COMClass' cannot be created. Apartment threaded components can only be created on pages with an <%@ Page aspcompat=true %> page directive.System.Web

The error above noted that we need to add page directive aspcompat = true because you are using COM interop with ASP.NET pages.

Just simply add the page directive "aspcompat=true" and it solved! :)

No comments:

Post a Comment