vb6 active-x dlls in asp.net

M

Markus

hi ng,

i've declared some com-objects from vb6 in my asp.net project in the
global.asax file.
(with text editor because vs.net only opens the code behind file...)

like

<object runat="server" scope="session" id="goARINI"
progid="ARINIManagerLib.ARINIManager" />


but when i Want to use it in visual studio it says name "goARINI" was not
declared.


is it normal behaviour or are there better ways to use vb6 activex dlls in
asp.net?

I need these objects global for the session.


thx, MP
 
B

Bruce Barker

the asax file generates a class that inherits from the code behind. so the
code behind will have no knowledge of it. aspx pages get around this by
declaring the server controls in the codebehind, and inheriting them.

you should have serveral options, create the objects in the codebehind, and
place them in the application object. create a module with static methods to
retieve the objects. create static mehods in the application object.

note: because vb6 object are apartment model, you must use the aspcompat
attribute on every page that references them (there is a performance cost to
this). also because aspcompat is not supported by webservices, you will need
special code to use a vb6 component in a webservice.

-- 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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top