writing COM controls to work in ASP.NET

N

Neal Bade

We have an OCX that we wrote some time ago for people to use in
VB/VC forms. Now we tried using it in an ASP.NET project to add
a web interface to our application. Problem is, we get server
errors from ASP such as the following:

[AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.]
System.RuntimeType.ForwardCallToInvokeMember( ... )
ELABELINFOLib.ELabelInfoClass.set_FormatName(String)
PrintPreview.Page_Load( ... )
System.Web.UI.Control.OnLoad(EventArgs e)
....


I read in MSDN Knowledge base article KB243603 (PRB: calling third
party component fails from active server pages) that some components
just don't work correctly from ASP.

What I am looking for are some guidelines as to how to modify our
control so that it does work correctly under ASP. The KB article
gives general info, but that does not tell me what I need to get
this to work correctly.

Any hints or pointers to other information would be greatly appreciated.

Neal
 
B

bruce barker

it needs to be thread safe, and support mta or sta. also it will not have
access to the window or the window loop. messagebox calls will fail as they
require access to the desktop.

you also need to be carefull of accessing registery profile information, as
its running as a service.

if its a sta com object, then the page must be run in aspcompat mode.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top