Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

writing COM controls to work in ASP.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Neal Bade - 06 Dec 2007 16:15 GMT
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
bruce barker - 06 Dec 2007 23:33 GMT
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)

> 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
[quoted text clipped - 21 lines]
>
> Neal

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.