Access to ASP objects from VB6 dll

Posted on 2003-02-23
Medium Priority
Last Modified: 2010-05-18
I'm adding a dll created with VB6 to my ASP application and need to access the Active Server Page intrinsic objects 'Application' and 'Session' from within the dll. I want my ASP application to be compatible with everything from PWS running on Windows 95 to IIS 5 running on Windows 2000 and so far it is. My development environment is Windows 2000 Pro.

I'm concerned that creating the dll with a reference to either MTS or COM+ will make my application incompatible with some web server installations because I know from experience that PWS and IIS are often installed without MTS. However, I keep reading that using ASPTypeLibrary.ScriptingContext in an OnStartPage event to get the Object Context is not a good thing.

Also, some references state that the OnStartPage event is triggered at the beginning of the ASP but other references state that it is triggered when the component is created from within the ASP script.

I want to keep the application simple to install and certainly don't want to force the installer to understand how to create MTS packages, etc.

My questions:
1. Is using ASPTypeLibrary.ScriptingContext in an OnStartPage event to get the Object Context really a bad idea?

2. Exactly when is the OnStartPage event triggered?

3. If I reference MTS or COM+ does the dll have to be registered in MTS to function. Also, if I compile the dll on Windows 2000 using COM+ would it work on another OS like NT4 or Windows 95?
Question by:teddro
  • 3
  • 2

Accepted Solution

Valliappan AN earned 380 total points
ID: 8006372

Author Comment

ID: 8018225
Thanks valli an. These are good articles. I haven't read it all yet but what I need to know may be in there.

I'd like to comment on the lack of responses when I post questions on EE. I don't know if it is the nature of my questions or what but this one is typical. Two days after posting I have one response (a good one though).

Take this question(s) for example. I would think that any experienced ASP/VB programmer would know the exact answers 'off the top of their heads'.

Author Comment

ID: 8019435
Well, i read everything at both links and they give lots of information on using ScriptingContext to get Object Context for accessing ASP objects, like Session and Application. Both articles admit this is a legacy method from the IIS 3 days, but no information on using MTS/COM+.


Expert Comment

by:Valliappan AN
ID: 8022500
I think you can have a read over here and the links over there:
(A lot of info on MTS and COM+)

and also this:
(About MTS and ASP)


Expert Comment

by:Valliappan AN
ID: 8022517

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question